1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 19:24:12 +01:00

[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

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;