[d3d11] Fixed incorrect aspect mask for depth-stencil clear ops

Application may specify a clear flag that the image format does
not support, in which case it should just be ignored. Fixes
validation errors in Microsoft's MultiThreadedRendering demo.
This commit is contained in:
Philip Rebohle 2018-01-28 21:13:37 +01:00
parent c6f4cf7330
commit b8e49f1eb8
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
1 changed files with 4 additions and 0 deletions

View File

@ -473,6 +473,10 @@ namespace dxvk {
if (ClearFlags & D3D11_CLEAR_STENCIL)
aspectMask |= VK_IMAGE_ASPECT_STENCIL_BIT;
const DxvkFormatInfo* formatInfo =
imageFormatInfo(dxvkView->info().format);
aspectMask &= formatInfo->aspectMask;
VkClearDepthStencilValue clearValue;
clearValue.depth = Depth;
clearValue.stencil = Stencil;