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
7d07f1f2
Commit
7d07f1f2
authored
May 18, 2012
by
Józef Kucia
Committed by
Alexandre Julliard
May 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Correctly handle D3DUSAGE_AUTOGENMIPMAP in D3DXCheckVolumeTextureRequirements.
parent
dfc085b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
texture.c
dlls/d3dx9_36/tests/texture.c
+20
-0
texture.c
dlls/d3dx9_36/texture.c
+5
-0
No files found.
dlls/d3dx9_36/tests/texture.c
View file @
7d07f1f2
...
...
@@ -517,6 +517,26 @@ static void test_D3DXCheckVolumeTextureRequirements(IDirect3DDevice9 *device)
hr
=
D3DXCheckVolumeTextureRequirements
(
device
,
NULL
,
NULL
,
NULL
,
&
mipmaps
,
0
,
NULL
,
D3DPOOL_DEFAULT
);
ok
(
hr
==
D3D_OK
,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
mipmaps
==
9
,
"Returned mipmaps %d, expected %d
\n
"
,
mipmaps
,
9
);
if
(
!
is_autogenmipmap_supported
(
device
,
D3DRTYPE_VOLUMETEXTURE
))
{
skip
(
"No D3DUSAGE_AUTOGENMIPMAP support for volume textures
\n
"
);
return
;
}
/* mipmaps when D3DUSAGE_AUTOGENMIPMAP is set */
mipmaps
=
0
;
hr
=
D3DXCheckVolumeTextureRequirements
(
device
,
NULL
,
NULL
,
NULL
,
&
mipmaps
,
D3DUSAGE_AUTOGENMIPMAP
,
NULL
,
D3DPOOL_DEFAULT
);
ok
(
hr
==
D3D_OK
,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
mipmaps
==
0
,
"Returned mipmaps %d, expected %d
\n
"
,
mipmaps
,
0
);
mipmaps
=
1
;
hr
=
D3DXCheckVolumeTextureRequirements
(
device
,
NULL
,
NULL
,
NULL
,
&
mipmaps
,
D3DUSAGE_AUTOGENMIPMAP
,
NULL
,
D3DPOOL_DEFAULT
);
ok
(
hr
==
D3D_OK
,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
mipmaps
==
1
,
"Returned mipmaps %d, expected %d
\n
"
,
mipmaps
,
1
);
mipmaps
=
3
;
hr
=
D3DXCheckVolumeTextureRequirements
(
device
,
NULL
,
NULL
,
NULL
,
&
mipmaps
,
D3DUSAGE_AUTOGENMIPMAP
,
NULL
,
D3DPOOL_DEFAULT
);
ok
(
hr
==
D3D_OK
,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
mipmaps
==
0
,
"Returned mipmaps %d, expected %d
\n
"
,
mipmaps
,
0
);
}
static
void
test_D3DXCreateTexture
(
IDirect3DDevice9
*
device
)
...
...
dlls/d3dx9_36/texture.c
View file @
7d07f1f2
...
...
@@ -436,6 +436,11 @@ HRESULT WINAPI D3DXCheckVolumeTextureRequirements(LPDIRECT3DDEVICE9 device,
{
if
(
!
(
caps
.
TextureCaps
&
D3DPTEXTURECAPS_MIPVOLUMEMAP
))
*
miplevels
=
1
;
else
if
((
usage
&
D3DUSAGE_AUTOGENMIPMAP
))
{
if
(
*
miplevels
>
1
)
*
miplevels
=
0
;
}
else
{
UINT
max_mipmaps
=
1
;
...
...
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