Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/d3d9/tests/device.c | 6 ++---- dlls/d3d9/texture.c | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index d0e566033f8..af0e8a0b337 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -12926,10 +12926,8 @@ static void test_resource_access(void)
hr = IDirect3DDevice9_CreateVolumeTexture(device, 16, 16, 1, 1, tests[i].usage, format, tests[i].pool, &texture, NULL); - todo_wine_if(tests[i].usage & D3DUSAGE_RENDERTARGET - && !(tests[i].usage & D3DUSAGE_DYNAMIC) && tests[i].pool == D3DPOOL_DEFAULT) - ok(hr == (!(tests[i].usage & ~D3DUSAGE_DYNAMIC) ? D3D_OK : D3DERR_INVALIDCALL), - "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == (!(tests[i].usage & ~D3DUSAGE_DYNAMIC) ? D3D_OK : D3DERR_INVALIDCALL), + "Test %u: Got unexpected hr %#x.\n", i, hr); if (FAILED(hr)) continue;
diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c index 4855985538c..e6524169e04 100644 --- a/dlls/d3d9/texture.c +++ b/dlls/d3d9/texture.c @@ -1453,6 +1453,10 @@ HRESULT volumetexture_init(struct d3d9_texture *texture, struct d3d9_device *dev struct wined3d_resource_desc desc; HRESULT hr;
+ /* In d3d9, 3D textures can't be used as rendertarget or depth/stencil buffer. */ + if (usage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL)) + return D3DERR_INVALIDCALL; + texture->IDirect3DBaseTexture9_iface.lpVtbl = (const IDirect3DBaseTexture9Vtbl *)&d3d9_texture_3d_vtbl; d3d9_resource_init(&texture->resource); list_init(&texture->rtv_list);
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=44652
Your paranoid android.
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)