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:
parent
c6f4cf7330
commit
b8e49f1eb8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user