mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +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
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue