From: Matt darkspace470@gmail.com
Beside Those States In wined3d_depth_buffer_type<br> Any Other Value Would Set desc.depth To False ,desc.depth Should Be Set To TRUE If Unrecognized Depth Buffer Type Is Passed
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47391<br> Original Patch Author: Felix Hädicke felixhaedicke@web.de --- dlls/d3d8/tests/visual.c | 2 ++ dlls/d3d9/tests/visual.c | 2 ++ dlls/wined3d/device.c | 1 + 3 files changed, 5 insertions(+)
diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index 264a4230a75..a25428c0abd 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -3597,6 +3597,8 @@ static void depth_buffer_test(void) ok(SUCCEEDED(hr), "SetRenderState failed, hr %#lx.\n", hr); hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); ok(SUCCEEDED(hr), "SetVertexShader failed, hr %#lx.\n", hr); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZENABLE, 100); + ok(SUCCEEDED(hr), "Any Non-Zero Value Should Enable Z-Buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice8_GetDepthStencilSurface(device, &depth_stencil); ok(SUCCEEDED(hr), "GetDepthStencilSurface failed, hr %#lx.\n", hr); diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index cb0a2549b2e..7bc1cce3e49 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -15159,6 +15159,8 @@ static void depth_buffer_test(void) ok(SUCCEEDED(hr), "SetRenderState failed, hr %#lx.\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); ok(SUCCEEDED(hr), "SetFVF failed, hr %#lx.\n", hr); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, 100); + ok(SUCCEEDED(hr), "Any Non-Zero Value Should Enable Z-Buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice9_GetRenderTarget(device, 0, &backbuffer); ok(SUCCEEDED(hr), "GetRenderTarget failed, hr %#lx.\n", hr); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index df186d9ffa2..20d0cbef9c1 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4378,6 +4378,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, break;
default: + desc.depth = TRUE; FIXME("Unrecognized depth buffer type %#x.\n", state->rs[WINED3D_RS_ZENABLE]); } desc.depth_write = state->rs[WINED3D_RS_ZWRITEENABLE];