Commit 64cf1399 by Chris Forbes

Propagate image view clear aspect mask to image clear

The mask was previously dropped on the floor here, and the imageview's only mask used instead. This would produce incorrect results when a renderpass begin operation had different load ops for depth vs stencil aspect. Bug: b/128715612 Change-Id: I2bf4051e16c027737b65cd5bc5193a94cf891c36 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27428Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 1a4c7121
...@@ -92,7 +92,9 @@ void ImageView::clear(const VkClearValue& clearValue, const VkImageAspectFlags a ...@@ -92,7 +92,9 @@ void ImageView::clear(const VkClearValue& clearValue, const VkImageAspectFlags a
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
image->clear(clearValue, renderArea, subresourceRange); VkImageSubresourceRange sr = subresourceRange;
sr.aspectMask = aspectMask;
image->clear(clearValue, renderArea, sr);
} }
void ImageView::clear(const VkClearValue& clearValue, const VkImageAspectFlags aspectMask, const VkClearRect& renderArea) void ImageView::clear(const VkClearValue& clearValue, const VkImageAspectFlags aspectMask, const VkClearRect& renderArea)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment