=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: d3d9/tests: Test user memory with D3DPOOL_SCRATCH.
Alexandre Julliard
julliard at winehq.org
Tue Dec 10 14:44:06 CST 2013
Module: wine
Branch: master
Commit: b7b0b7d2e1f8a2fa73ce5e801a0e4f00cc9abc84
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b7b0b7d2e1f8a2fa73ce5e801a0e4f00cc9abc84
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Tue Dec 10 14:36:55 2013 +0100
d3d9/tests: Test user memory with D3DPOOL_SCRATCH.
---
dlls/d3d9/device.c | 7 +++++++
dlls/d3d9/tests/d3d9ex.c | 7 +++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 5dc207a..6721101 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -747,7 +747,14 @@ static HRESULT WINAPI d3d9_device_CreateTexture(IDirect3DDevice9Ex *iface,
set_mem = TRUE;
}
else
+ {
+ if (pool != D3DPOOL_DEFAULT)
+ {
+ WARN("Trying to create a shared texture in pool %#x.\n", pool);
+ return D3DERR_INVALIDCALL;
+ }
FIXME("Resource sharing not implemented, *shared_handle %p.\n", *shared_handle);
+ }
}
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c
index 5825c35..810d2a0 100644
--- a/dlls/d3d9/tests/d3d9ex.c
+++ b/dlls/d3d9/tests/d3d9ex.c
@@ -535,7 +535,7 @@ out:
IDirect3D9Ex_Release(d3d9ex);
}
-static void test_texture_sysmem_create(void)
+static void test_user_memory(void)
{
IDirect3DDevice9Ex *device;
IDirect3DTexture9 *texture;
@@ -562,6 +562,9 @@ static void test_texture_sysmem_create(void)
hr = IDirect3DDevice9Ex_CreateTexture(device, 128, 128, 2, 0, D3DFMT_A8R8G8B8,
D3DPOOL_SYSTEMMEM, &texture, &mem);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+ hr = IDirect3DDevice9Ex_CreateTexture(device, 128, 128, 1, 0, D3DFMT_A8R8G8B8,
+ D3DPOOL_SCRATCH, &texture, &mem);
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9Ex_CreateTexture(device, 128, 128, 1, 0, D3DFMT_A8R8G8B8,
D3DPOOL_SYSTEMMEM, &texture, &mem);
@@ -1114,7 +1117,7 @@ START_TEST(d3d9ex)
test_swapchain_get_displaymode_ex();
test_get_adapter_luid();
test_get_adapter_displaymode_ex();
- test_texture_sysmem_create();
+ test_user_memory();
test_reset();
test_reset_resources();
test_vidmem_accounting();
More information about the wine-cvs
mailing list