From a24ff273861239421f213340c31f81686e689ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Sun, 30 Aug 2015 22:44:41 +0200 Subject: [PATCH] d3d11: Fix resource misc flags conversion. Tests with ID3D11Buffers have shown that not all resource misc flags are translated to d3d10 flags. --- dlls/d3d11/utils.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/dlls/d3d11/utils.c b/dlls/d3d11/utils.c index 7accfcd14aa..3ad00da51b4 100644 --- a/dlls/d3d11/utils.c +++ b/dlls/d3d11/utils.c @@ -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)