mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 22:29:15 +01:00
[dxvk] Don't re-initialize 3D images when clearing render targets
Layout transitions apply to the full subresource, even if we only render to one slice. Fixes #775 on Nvidia Kepler and Maxwell cards.
This commit is contained in:
parent
df667b7b0e
commit
171cf53bc0
@ -515,7 +515,8 @@ namespace dxvk {
|
|||||||
if (clearAspects & VK_IMAGE_ASPECT_STENCIL_BIT)
|
if (clearAspects & VK_IMAGE_ASPECT_STENCIL_BIT)
|
||||||
depthOp.loadOpS = VK_ATTACHMENT_LOAD_OP_CLEAR;
|
depthOp.loadOpS = VK_ATTACHMENT_LOAD_OP_CLEAR;
|
||||||
|
|
||||||
if (clearAspects == imageView->info().aspect) {
|
if (clearAspects == imageView->info().aspect
|
||||||
|
&& imageView->imageInfo().type != VK_IMAGE_TYPE_3D) {
|
||||||
colorOp.loadLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
colorOp.loadLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||||
depthOp.loadLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
depthOp.loadLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user