Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
9517305c
Commit
9517305c
authored
Nov 24, 2010
by
Matteo Bruni
Committed by
Alexandre Julliard
Nov 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Fix some tests to take into account POW2 texture capability flags.
parent
9d74e4de
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
texture.c
dlls/d3dx9_36/tests/texture.c
+13
-5
No files found.
dlls/d3dx9_36/tests/texture.c
View file @
9517305c
...
...
@@ -109,6 +109,8 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
ok
(
hr
==
D3D_OK
,
"D3DXCheckTextureRequirements returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
mipmaps
==
7
,
"Returned mipmaps %d, expected %d
\n
"
,
mipmaps
,
7
);
if
(
!
(
caps
.
TextureCaps
&
D3DPTEXTURECAPS_POW2
))
{
width
=
284
;
height
=
137
;
mipmaps
=
20
;
hr
=
D3DXCheckTextureRequirements
(
device
,
&
width
,
&
height
,
&
mipmaps
,
0
,
NULL
,
D3DPOOL_DEFAULT
);
...
...
@@ -120,6 +122,9 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
hr
=
D3DXCheckTextureRequirements
(
device
,
&
width
,
&
height
,
&
mipmaps
,
0
,
NULL
,
D3DPOOL_DEFAULT
);
ok
(
hr
==
D3D_OK
,
"D3DXCheckTextureRequirements returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
mipmaps
==
6
,
"Returned mipmaps %d, expected %d
\n
"
,
mipmaps
,
6
);
}
else
skip
(
"Skipping some tests, npot2 textures unsupported
\n
"
);
mipmaps
=
20
;
hr
=
D3DXCheckTextureRequirements
(
device
,
NULL
,
NULL
,
&
mipmaps
,
0
,
NULL
,
D3DPOOL_DEFAULT
);
...
...
@@ -193,7 +198,7 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
static
void
test_D3DXCheckCubeTextureRequirements
(
IDirect3DDevice9
*
device
)
{
UINT
size
,
mipmaps
;
UINT
size
,
mipmaps
,
expected
;
D3DFORMAT
format
;
D3DCAPS9
caps
;
HRESULT
hr
;
...
...
@@ -231,15 +236,17 @@ static void test_D3DXCheckCubeTextureRequirements(IDirect3DDevice9 *device)
size
=
284
;
mipmaps
=
20
;
expected
=
caps
.
TextureCaps
&
D3DPTEXTURECAPS_CUBEMAP_POW2
?
10
:
9
;
hr
=
D3DXCheckCubeTextureRequirements
(
device
,
&
size
,
&
mipmaps
,
0
,
NULL
,
D3DPOOL_DEFAULT
);
ok
(
hr
==
D3D_OK
,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
mipmaps
==
10
,
"Returned mipmaps %d, expected %d
\n
"
,
mipmaps
,
10
);
ok
(
mipmaps
==
expected
,
"Returned mipmaps %d, expected %d
\n
"
,
mipmaps
,
expected
);
size
=
63
;
mipmaps
=
9
;
expected
=
caps
.
TextureCaps
&
D3DPTEXTURECAPS_CUBEMAP_POW2
?
7
:
6
;
hr
=
D3DXCheckCubeTextureRequirements
(
device
,
&
size
,
&
mipmaps
,
0
,
NULL
,
D3DPOOL_DEFAULT
);
ok
(
hr
==
D3D_OK
,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
mipmaps
==
7
,
"Returned mipmaps %d, expected %d
\n
"
,
mipmaps
,
7
);
ok
(
mipmaps
==
expected
,
"Returned mipmaps %d, expected %d
\n
"
,
mipmaps
,
expected
);
mipmaps
=
0
;
hr
=
D3DXCheckCubeTextureRequirements
(
device
,
NULL
,
&
mipmaps
,
0
,
NULL
,
D3DPOOL_DEFAULT
);
...
...
@@ -280,7 +287,7 @@ static void test_D3DXCheckCubeTextureRequirements(IDirect3DDevice9 *device)
static
void
test_D3DXCheckVolumeTextureRequirements
(
IDirect3DDevice9
*
device
)
{
UINT
width
,
height
,
depth
,
mipmaps
;
UINT
width
,
height
,
depth
,
mipmaps
,
expected
;
D3DFORMAT
format
;
D3DCAPS9
caps
;
HRESULT
hr
;
...
...
@@ -376,9 +383,10 @@ static void test_D3DXCheckVolumeTextureRequirements(IDirect3DDevice9 *device)
height
=
143
;
depth
=
55
;
mipmaps
=
20
;
expected
=
caps
.
TextureCaps
&
D3DPTEXTURECAPS_VOLUMEMAP_POW2
?
10
:
9
;
hr
=
D3DXCheckVolumeTextureRequirements
(
device
,
&
width
,
&
height
,
&
depth
,
&
mipmaps
,
0
,
NULL
,
D3DPOOL_DEFAULT
);
ok
(
hr
==
D3D_OK
,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
mipmaps
==
10
,
"Returned mipmaps %d, expected %d
\n
"
,
mipmaps
,
10
);
ok
(
mipmaps
==
expected
,
"Returned mipmaps %d, expected %d
\n
"
,
mipmaps
,
expected
);
mipmaps
=
0
;
hr
=
D3DXCheckVolumeTextureRequirements
(
device
,
NULL
,
NULL
,
NULL
,
&
mipmaps
,
0
,
NULL
,
D3DPOOL_DEFAULT
);
...
...
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