Commit 54d63891 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Allow binding scratch textures.

parent 87871e75
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment