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

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2018-11-21 16:47:27 +03:30 committed by Alexandre Julliard
parent 949dbbd31f
commit 0ffaf5c28a
2 changed files with 4 additions and 4 deletions

View File

@ -12877,10 +12877,11 @@ static void test_resource_access(void)
expected_hr = D3D_OK;
else
expected_hr = D3DERR_INVALIDCALL;
todo_wine_if(expected_hr != D3D_OK && surface_types[i].type != SURFACE_2D)
todo_wine_if(expected_hr != D3D_OK && surface_types[i].type != SURFACE_2D
&& surface_types[i].type != SURFACE_CUBE)
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)
todo_wine_if(expected_hr != D3D_OK && surface_types[i].type != SURFACE_CUBE)
ok(hr == expected_hr, "Test %s %u: Got unexpected hr %#x.\n", surface_types[i].name, j, hr);
if (SUCCEEDED(IDirect3DSurface9_GetContainer(surface, &IID_IDirect3DBaseTexture9, (void **)&texture)))

View File

@ -1397,8 +1397,7 @@ HRESULT cubetexture_init(struct d3d9_texture *texture, struct d3d9_device *devic
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 = edge_length;
desc.height = edge_length;
desc.depth = 1;