Vulkan: Compare storeOp when comparing the key of RenderPassCache

This patch adds the missing comparisons on the storeOp when comparing
the key of RenderPassCache as now we support more than one storeOp
(Store and Discard).

With this patch the following end2end test will pass on Windows Intel
Vulkan drivers:
- TextureZeroInitTest.IndependentDepthStencilLoadAfterDiscard

BUG=dawn:1151
TEST=dawn_end2end_tests

Change-Id: I44d6f3e589341bba761503b1a06c388db92d1295
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75482
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
Jiawei Shao 2022-01-07 00:02:57 +00:00 committed by Dawn LUCI CQ
parent d59da9d886
commit e009ad7edd
2 changed files with 3 additions and 5 deletions

View File

@ -270,7 +270,8 @@ namespace dawn_native::vulkan {
for (ColorAttachmentIndex i : IterateBitSet(a.colorMask)) {
if ((a.colorFormats[i] != b.colorFormats[i]) ||
(a.colorLoadOp[i] != b.colorLoadOp[i])) {
(a.colorLoadOp[i] != b.colorLoadOp[i]) ||
(a.colorStoreOp[i] != b.colorStoreOp[i])) {
return false;
}
}
@ -282,6 +283,7 @@ namespace dawn_native::vulkan {
if (a.hasDepthStencil) {
if ((a.depthStencilFormat != b.depthStencilFormat) ||
(a.depthLoadOp != b.depthLoadOp) || (a.stencilLoadOp != b.stencilLoadOp) ||
(a.depthStoreOp != b.depthStoreOp) || (a.stencilStoreOp != b.stencilStoreOp) ||
(a.readOnlyDepthStencil != b.readOnlyDepthStencil)) {
return false;
}

View File

@ -592,10 +592,6 @@ TEST_P(TextureZeroInitTest, IndependentDepthStencilLoadAfterDiscard) {
// on some Intel drivers.
DAWN_SUPPRESS_TEST_IF(IsMetal() && IsIntel());
// TODO(crbug.com/dawn/1151): The test started failing on Wintel Vulkan when Discard was
// implemented for the Vulkan backend.
DAWN_SUPPRESS_TEST_IF(IsVulkan() && IsWindows() && IsIntel());
wgpu::TextureDescriptor depthStencilDescriptor = CreateTextureDescriptor(
1, 1, wgpu::TextureUsage::RenderAttachment | wgpu::TextureUsage::CopySrc,
kDepthStencilFormat);