Stefan Dösinger : d3d9: Use a vertex shader for the nested loop test.
Alexandre Julliard
julliard at winehq.org
Wed Jul 21 10:54:53 CDT 2010
Module: wine
Branch: master
Commit: ba0a5ed104eba6efc54da25a7ae1317c74631402
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ba0a5ed104eba6efc54da25a7ae1317c74631402
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Sat Jul 3 18:53:24 2010 +0200
d3d9: Use a vertex shader for the nested loop test.
Win7 (or newer Nvidia drivers) don't allow ps_3_0 fragment processing without
vertex shaders. This is interesting on its own, but not part of this test.
---
dlls/d3d9/tests/visual.c | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 734bb82..66bf391 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -5460,7 +5460,15 @@ static void nested_loop_test(IDirect3DDevice9 *device) {
0x02000001, 0x800f0800, 0x80e40000, /* mov oC0, r0 */
0x0000ffff /* end */
};
+ const DWORD vshader_code[] = {
+ 0xfffe0300, /* vs_3_0 */
+ 0x0200001f, 0x80000000, 0x900f0000, /* dcl_position v0 */
+ 0x0200001f, 0x80000000, 0xe00f0000, /* dcl_position o0 */
+ 0x02000001, 0xe00f0000, 0x90e40000, /* mov o0, v0 */
+ 0x0000ffff /* end */
+ };
IDirect3DPixelShader9 *shader;
+ IDirect3DVertexShader9 *vshader;
HRESULT hr;
DWORD color;
const float quad[] = {
@@ -5474,6 +5482,10 @@ static void nested_loop_test(IDirect3DDevice9 *device) {
ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader failed with %08x\n", hr);
hr = IDirect3DDevice9_SetPixelShader(device, shader);
ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed with %08x\n", hr);
+ hr = IDirect3DDevice9_CreateVertexShader(device, vshader_code, &vshader);
+ ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader failed with %08x\n", hr);
+ hr = IDirect3DDevice9_SetVertexShader(device, vshader);
+ ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader failed with %08x\n", hr);
hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ);
ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr);
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x0000ff00, 0.0, 0);
@@ -5498,7 +5510,10 @@ static void nested_loop_test(IDirect3DDevice9 *device) {
hr = IDirect3DDevice9_SetPixelShader(device, NULL);
ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed with %08x\n", hr);
+ hr = IDirect3DDevice9_SetVertexShader(device, NULL);
+ ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader failed with %08x\n", hr);
IDirect3DPixelShader9_Release(shader);
+ IDirect3DVertexShader9_Release(vshader);
}
struct varying_test_struct
@@ -11317,20 +11332,16 @@ START_TEST(visual)
cnd_test(device_ptr);
if (caps.PixelShaderVersion >= D3DPS_VERSION(2, 0)) {
dp2add_ps_test(device_ptr);
- if (caps.PixelShaderVersion >= D3DPS_VERSION(3, 0)) {
+ if (caps.PixelShaderVersion >= D3DPS_VERSION(3, 0) && caps.VertexShaderVersion >= D3DVS_VERSION(3, 0)) {
nested_loop_test(device_ptr);
fixed_function_varying_test(device_ptr);
vFace_register_test(device_ptr);
vpos_register_test(device_ptr);
multiple_rendertargets_test(device_ptr);
- if(caps.VertexShaderVersion >= D3DVS_VERSION(3, 0)) {
- vshader_version_varying_test(device_ptr);
- pshader_version_varying_test(device_ptr);
- } else {
- skip("No vs_3_0 support\n");
- }
+ vshader_version_varying_test(device_ptr);
+ pshader_version_varying_test(device_ptr);
} else {
- skip("No ps_3_0 support\n");
+ skip("No ps_3_0 or vs_3_0 support\n");
}
} else {
skip("No ps_2_0 support\n");
More information about the wine-cvs
mailing list