Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ce85a905
Commit
ce85a905
authored
Sep 19, 2003
by
Jason Edmeades
Committed by
Alexandre Julliard
Sep 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DXTn format has odd mipmap levels in that the space allocated for
small levels needs a lot of padding.
parent
7ac9d258
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
device.c
dlls/d3d8/device.c
+7
-1
No files found.
dlls/d3d8/device.c
View file @
ce85a905
...
...
@@ -853,8 +853,14 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateImageSurface(LPDIRECT3DDEVICE8 iface
object
->
myDesc
.
Usage
=
0
;
object
->
myDesc
.
Pool
=
D3DPOOL_SYSTEMMEM
;
object
->
bytesPerPixel
=
D3DFmtGetBpp
(
This
,
Format
);
/* DXTn mipmaps use the same number of 'levels' down to eg. 8x1, but since
it is based around 4x4 pixel blocks it requires padding, so allocate enough
space! */
if
(
Format
==
D3DFMT_DXT1
)
{
object
->
myDesc
.
Size
=
((
Width
*
object
->
bytesPerPixel
)
*
Height
)
/
2
;
/* DXT1 is half byte per pixel */
object
->
myDesc
.
Size
=
((
max
(
Width
,
4
)
*
object
->
bytesPerPixel
)
*
max
(
Height
,
4
))
/
2
;
/* DXT1 is half byte per pixel */
}
else
if
(
Format
==
D3DFMT_DXT2
||
Format
==
D3DFMT_DXT3
||
Format
==
D3DFMT_DXT4
||
Format
==
D3DFMT_DXT5
)
{
object
->
myDesc
.
Size
=
((
max
(
Width
,
4
)
*
object
->
bytesPerPixel
)
*
max
(
Height
,
4
));
}
else
{
object
->
myDesc
.
Size
=
(
Width
*
object
->
bytesPerPixel
)
*
Height
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment