| 1 |
From 544395a5d9da52fdaa59ad9c98f32f731b64b6b2 Mon Sep 17 00:00:00 2001 |
| 2 |
From: Michael Ludwig <[email protected]> |
| 3 |
Date: Thu, 21 May 2026 11:57:33 -0400 |
| 4 |
Subject: [PATCH] [ganesh] Use & when testing for input attachment self-dep |
| 5 |
|
| 6 |
Other than these two sites, kForInputAttachment and |
| 7 |
kForNonCoherentAdvBlend are not treated as mutually exclusive. |
| 8 |
|
| 9 |
When using only == kForInputAttachment, the layout and bindings wouldn't |
| 10 |
apply correctly for a renderpass that was using both forms of self |
| 11 |
dependencies. |
| 12 |
|
| 13 |
Bug: https://issues.chromium.org/issues/512995705 |
| 14 |
Fixed: 512995705 |
| 15 |
Change-Id: I40aff60a9209be77e6743d7a2f73dac46985507a |
| 16 |
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1242516 |
| 17 |
Commit-Queue: Michael Ludwig <[email protected]> |
| 18 |
Reviewed-by: Nicolette Prevost <[email protected]> |
| 19 |
--- |
| 20 |
src/gpu/ganesh/vk/GrVkOpsRenderPass.cpp | 4 ++-- |
| 21 |
1 file changed, 2 insertions(+), 2 deletions(-) |
| 22 |
|
| 23 |
diff --git a/src/gpu/ganesh/vk/GrVkOpsRenderPass.cpp b/src/gpu/ganesh/vk/GrVkOpsRenderPass.cpp |
| 24 |
index 5f9fddd296..3ff4a7c809 100644 |
| 25 |
--- a/src/gpu/ganesh/vk/GrVkOpsRenderPass.cpp |
| 26 |
+++ b/src/gpu/ganesh/vk/GrVkOpsRenderPass.cpp |
| 27 |
@@ -89,7 +89,7 @@ void GrVkOpsRenderPass::setAttachmentLayouts(LoadFromResolve loadFromResolve) { |
| 28 |
bool withStencil = fCurrentRenderPass->hasStencilAttachment(); |
| 29 |
bool withResolve = fCurrentRenderPass->hasResolveAttachment(); |
| 30 |
|
| 31 |
- if (fSelfDependencyFlags == SelfDependencyFlags::kForInputAttachment) { |
| 32 |
+ if (fSelfDependencyFlags & SelfDependencyFlags::kForInputAttachment) { |
| 33 |
// We need to use the GENERAL layout in this case since we'll be using texture barriers |
| 34 |
// with an input attachment. |
| 35 |
VkAccessFlags dstAccess = VK_ACCESS_INPUT_ATTACHMENT_READ_BIT | |
| 36 |
@@ -738,7 +738,7 @@ bool GrVkOpsRenderPass::onBindTextures(const GrGeometryProcessor& geomProc, |
| 37 |
this->currentCommandBuffer())) { |
| 38 |
return false; |
| 39 |
} |
| 40 |
- if (fSelfDependencyFlags == SelfDependencyFlags::kForInputAttachment) { |
| 41 |
+ if (fSelfDependencyFlags & SelfDependencyFlags::kForInputAttachment) { |
| 42 |
// We bind the color attachment as an input attachment |
| 43 |
auto ds = fFramebuffer->colorAttachment()->inputDescSetForBlending(fGpu); |
| 44 |
if (!ds) { |
| 45 |
-- |
| 46 |
2.43.0 |
| 47 |
|