Only apply stencil flag if selected format has a stencil part
Refs #947
This commit is contained in:
parent
8c376121c3
commit
570ba6da47
3 changed files with 19 additions and 3 deletions
|
|
@ -196,7 +196,10 @@ public:
|
|||
depthStencilView.format = depthFormat;
|
||||
depthStencilView.flags = 0;
|
||||
depthStencilView.subresourceRange = {};
|
||||
depthStencilView.subresourceRange.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||
depthStencilView.subresourceRange.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT;
|
||||
if (vks::tools::formatHasStencil(depthFormat)) {
|
||||
depthStencilView.subresourceRange.aspectMask |= VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||
}
|
||||
depthStencilView.subresourceRange.baseMipLevel = 0;
|
||||
depthStencilView.subresourceRange.levelCount = 1;
|
||||
depthStencilView.subresourceRange.baseArrayLayer = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue