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
320b33e5
Commit
320b33e5
authored
Dec 06, 2012
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Skip some texture transform tests if shaders are unsupported.
parent
7183c695
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
2 deletions
+32
-2
visual.c
dlls/d3d9/tests/visual.c
+32
-2
No files found.
dlls/d3d9/tests/visual.c
View file @
320b33e5
...
@@ -3878,12 +3878,25 @@ static void projected_textures_test(IDirect3DDevice9 *device,
...
@@ -3878,12 +3878,25 @@ static void projected_textures_test(IDirect3DDevice9 *device,
};
};
IDirect3DVertexShader9
*
vs
=
NULL
;
IDirect3DVertexShader9
*
vs
=
NULL
;
IDirect3DPixelShader9
*
ps
=
NULL
;
IDirect3DPixelShader9
*
ps
=
NULL
;
IDirect3D9
*
d3d
;
D3DCAPS9
caps
;
HRESULT
hr
;
HRESULT
hr
;
IDirect3DDevice9_GetDirect3D
(
device
,
&
d3d
);
hr
=
IDirect3DDevice9_GetDeviceCaps
(
device
,
&
caps
);
ok
(
SUCCEEDED
(
hr
),
"GetDeviceCaps failed (%08x)
\n
"
,
hr
);
IDirect3D9_Release
(
d3d
);
if
(
caps
.
VertexShaderVersion
>=
D3DVS_VERSION
(
1
,
1
))
{
hr
=
IDirect3DDevice9_CreateVertexShader
(
device
,
vertex_shader
,
&
vs
);
hr
=
IDirect3DDevice9_CreateVertexShader
(
device
,
vertex_shader
,
&
vs
);
ok
(
SUCCEEDED
(
hr
),
"CreateVertexShader failed (%08x)
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"CreateVertexShader failed (%08x)
\n
"
,
hr
);
}
if
(
caps
.
PixelShaderVersion
>=
D3DPS_VERSION
(
1
,
3
))
{
hr
=
IDirect3DDevice9_CreatePixelShader
(
device
,
pixel_shader
,
&
ps
);
hr
=
IDirect3DDevice9_CreatePixelShader
(
device
,
pixel_shader
,
&
ps
);
ok
(
SUCCEEDED
(
hr
),
"CreatePixelShader failed (%08x)
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"CreatePixelShader failed (%08x)
\n
"
,
hr
);
}
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xff203040
,
0
.
0
f
,
0
);
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xff203040
,
0
.
0
f
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear returned %08x
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear returned %08x
\n
"
,
hr
);
...
@@ -3920,12 +3933,26 @@ static void projected_textures_test(IDirect3DDevice9 *device,
...
@@ -3920,12 +3933,26 @@ static void projected_textures_test(IDirect3DDevice9 *device,
};
};
if
(
tests
[
i
].
vs
)
if
(
tests
[
i
].
vs
)
{
if
(
!
vs
)
{
skip
(
"Vertex shaders not supported, skipping
\n
"
);
continue
;
}
hr
=
IDirect3DDevice9_SetVertexShader
(
device
,
vs
);
hr
=
IDirect3DDevice9_SetVertexShader
(
device
,
vs
);
}
else
else
hr
=
IDirect3DDevice9_SetVertexShader
(
device
,
NULL
);
hr
=
IDirect3DDevice9_SetVertexShader
(
device
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"SetVertexShader failed (%08x)
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"SetVertexShader failed (%08x)
\n
"
,
hr
);
if
(
tests
[
i
].
ps
)
if
(
tests
[
i
].
ps
)
{
if
(
!
ps
)
{
skip
(
"Pixel shaders not supported, skipping
\n
"
);
continue
;
}
hr
=
IDirect3DDevice9_SetPixelShader
(
device
,
ps
);
hr
=
IDirect3DDevice9_SetPixelShader
(
device
,
ps
);
}
else
else
hr
=
IDirect3DDevice9_SetPixelShader
(
device
,
NULL
);
hr
=
IDirect3DDevice9_SetPixelShader
(
device
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"SetPixelShader failed (%08x)
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"SetPixelShader failed (%08x)
\n
"
,
hr
);
...
@@ -3949,11 +3976,14 @@ static void projected_textures_test(IDirect3DDevice9 *device,
...
@@ -3949,11 +3976,14 @@ static void projected_textures_test(IDirect3DDevice9 *device,
hr
=
IDirect3DDevice9_SetVertexShader
(
device
,
NULL
);
hr
=
IDirect3DDevice9_SetVertexShader
(
device
,
NULL
);
hr
=
IDirect3DDevice9_SetPixelShader
(
device
,
NULL
);
hr
=
IDirect3DDevice9_SetPixelShader
(
device
,
NULL
);
IDirect3DVertexShader9_Release
(
vs
);
if
(
vs
)
IDirect3DVertexShader9_Release
(
vs
);
IDirect3DPixelShader9_Release
(
ps
);
if
(
ps
)
IDirect3DPixelShader9_Release
(
ps
);
for
(
i
=
0
;
i
<
4
;
++
i
)
for
(
i
=
0
;
i
<
4
;
++
i
)
{
if
((
!
tests
[
i
].
vs
||
vs
)
&&
(
!
tests
[
i
].
ps
||
ps
))
check_rect
(
device
,
tests
[
i
].
rect
,
tests
[
i
].
message
);
check_rect
(
device
,
tests
[
i
].
rect
,
tests
[
i
].
message
);
}
hr
=
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
hr
=
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Present failed with %08x
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Present failed with %08x
\n
"
,
hr
);
...
...
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