Commit 949dbbd3 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9: Do not add map access indiscriminately in texture_init().

parent d4968761
......@@ -12877,7 +12877,7 @@ static void test_resource_access(void)
expected_hr = D3D_OK;
else
expected_hr = D3DERR_INVALIDCALL;
todo_wine_if(expected_hr != D3D_OK)
todo_wine_if(expected_hr != D3D_OK && surface_types[i].type != SURFACE_2D)
ok(hr == expected_hr, "Test %s %u: Got unexpected hr %#x.\n", surface_types[i].name, j, hr);
hr = IDirect3DSurface9_UnlockRect(surface);
todo_wine_if(expected_hr != D3D_OK)
......
......@@ -1314,8 +1314,7 @@ HRESULT texture_init(struct d3d9_texture *texture, struct d3d9_device *device,
if (pool == D3DPOOL_SCRATCH)
desc.usage |= WINED3DUSAGE_SCRATCH;
desc.bind_flags = wined3d_bind_flags_from_d3d9_usage(usage) | WINED3D_BIND_SHADER_RESOURCE;
desc.access = wined3daccess_from_d3dpool(pool, usage)
| WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
desc.access = wined3daccess_from_d3dpool(pool, usage);
desc.width = width;
desc.height = height;
desc.depth = 1;
......
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