mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[dxvk] Store new image view when deferring clear/discard with matching subresources
Otherwise, if the view used for the second clear has a different format than the first one, we'll end up clearing to the wrong colur. Assumes that images with more than one aspect never have views with mismatching formats. Also potentially improves logic around render pass clears depending on usage patterns.
This commit is contained in:
parent
b579b03047
commit
8a4beefd3a
@ -1857,6 +1857,7 @@ namespace dxvk {
|
||||
VkClearValue clearValue) {
|
||||
for (auto& entry : m_deferredClears) {
|
||||
if (entry.imageView->checkSubresourceMatch(imageView)) {
|
||||
entry.imageView = imageView;
|
||||
entry.discardAspects &= ~clearAspects;
|
||||
entry.clearAspects |= clearAspects;
|
||||
|
||||
@ -1883,6 +1884,7 @@ namespace dxvk {
|
||||
VkImageAspectFlags discardAspects) {
|
||||
for (auto& entry : m_deferredClears) {
|
||||
if (entry.imageView->checkSubresourceMatch(imageView)) {
|
||||
entry.imageView = imageView;
|
||||
entry.discardAspects |= discardAspects;
|
||||
entry.clearAspects &= ~discardAspects;
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user