[PATCH 04/10] wined3d: Allow binding scratch textures.

Henri Verbeet hverbeet at codeweavers.com
Sun Nov 18 12:39:15 CST 2018


Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/d3d8/tests/device.c | 6 ++----
 dlls/d3d9/tests/device.c | 6 ++----
 dlls/wined3d/device.c    | 6 ------
 3 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index 862dbb4c45a..56690091df3 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -9055,8 +9055,7 @@ static void test_resource_access(void)
             if (SUCCEEDED(IDirect3DSurface8_GetContainer(surface, &IID_IDirect3DBaseTexture8, (void **)&texture)))
             {
                 hr = IDirect3DDevice8_SetTexture(device, 0, texture);
-                todo_wine_if(surface_desc.Pool == D3DPOOL_SCRATCH)
-                    ok(hr == D3D_OK, "Test %s %u: Got unexpected hr %#x.\n", surface_types[i].name, j, hr);
+                ok(hr == D3D_OK, "Test %s %u: Got unexpected hr %#x.\n", surface_types[i].name, j, hr);
                 hr = IDirect3DDevice8_SetTexture(device, 0, NULL);
                 ok(hr == D3D_OK, "Test %s %u: Got unexpected hr %#x.\n", surface_types[i].name, j, hr);
                 IDirect3DBaseTexture8_Release(texture);
@@ -9121,8 +9120,7 @@ static void test_resource_access(void)
         ok(hr == expected_hr, "Test %u: Got unexpected hr %#x.\n", i, hr);
 
         hr = IDirect3DDevice8_SetTexture(device, 0, (IDirect3DBaseTexture8 *)texture);
-        todo_wine_if(volume_desc.Pool == D3DPOOL_SCRATCH)
-            ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+        ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
         hr = IDirect3DDevice8_SetTexture(device, 0, NULL);
         ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
 
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index ee7d0c622ab..4e620d59b84 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -12888,8 +12888,7 @@ static void test_resource_access(void)
             if (SUCCEEDED(IDirect3DSurface9_GetContainer(surface, &IID_IDirect3DBaseTexture9, (void **)&texture)))
             {
                 hr = IDirect3DDevice9_SetTexture(device, 0, texture);
-                todo_wine_if(surface_desc.Pool == D3DPOOL_SCRATCH)
-                    ok(hr == D3D_OK, "Test %s %u: Got unexpected hr %#x.\n", surface_types[i].name, j, hr);
+                ok(hr == D3D_OK, "Test %s %u: Got unexpected hr %#x.\n", surface_types[i].name, j, hr);
                 hr = IDirect3DDevice9_SetTexture(device, 0, NULL);
                 ok(hr == D3D_OK, "Test %s %u: Got unexpected hr %#x.\n", surface_types[i].name, j, hr);
                 IDirect3DBaseTexture9_Release(texture);
@@ -12954,8 +12953,7 @@ static void test_resource_access(void)
         ok(hr == expected_hr, "Test %u: Got unexpected hr %#x.\n", i, hr);
 
         hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *)texture);
-        todo_wine_if(volume_desc.Pool == D3DPOOL_SCRATCH)
-            ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+        ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
         hr = IDirect3DDevice9_SetTexture(device, 0, NULL);
         ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
 
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 50ce89ac181..2ae9235b067 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3467,12 +3467,6 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device,
         return WINED3D_OK;
     }
 
-    if (texture && texture->resource.usage & WINED3DUSAGE_SCRATCH)
-    {
-        WARN("Rejecting attempt to set scratch texture.\n");
-        return WINED3DERR_INVALIDCALL;
-    }
-
     if (device->recording)
         device->recording->changed.textures |= 1u << stage;
 
-- 
2.11.0




More information about the wine-devel mailing list