d3d11: Fix resource misc flags conversion.

Tests with ID3D11Buffers have shown that not all resource misc flags
are translated to d3d10 flags.
This commit is contained in:
Józef Kucia 2015-08-30 22:44:41 +02:00 committed by Alexandre Julliard
parent 59745133f3
commit a24ff27386
1 changed files with 6 additions and 9 deletions

View File

@ -488,17 +488,14 @@ UINT d3d10_resource_misc_flags_from_d3d11_resource_misc_flags(UINT resource_misc
{
static const UINT bitwise_identical_flags = D3D11_RESOURCE_MISC_GENERATE_MIPS
| D3D11_RESOURCE_MISC_SHARED
| D3D11_RESOURCE_MISC_TEXTURECUBE
| D3D11_RESOURCE_MISC_BUFFER_STRUCTURED
| D3D11_RESOURCE_MISC_RESOURCE_CLAMP
| D3D11_RESOURCE_MISC_SHARED_NTHANDLE
| D3D11_RESOURCE_MISC_RESTRICTED_CONTENT
| D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE
| D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE_DRIVER
| D3D11_RESOURCE_MISC_GUARDED;
| D3D11_RESOURCE_MISC_TEXTURECUBE;
const UINT handled_flags = bitwise_identical_flags
| D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS
| D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS
| D3D11_RESOURCE_MISC_BUFFER_STRUCTURED
| D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX
| D3D11_RESOURCE_MISC_GDI_COMPATIBLE;
| D3D11_RESOURCE_MISC_GDI_COMPATIBLE
| D3D11_RESOURCE_MISC_SHARED_NTHANDLE;
UINT d3d10_resource_misc_flags = resource_misc_flags & bitwise_identical_flags;
if (resource_misc_flags & D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX)