Fix comparison of specialization constant keys.
The code in VkPipelineCache was correctly comparing all the attributes
of the specialization constants and then was also doing a faulty shared
pointer comparison. This was causing major drag on draw calls as every
draw call in ANGLE was recompiling the shader.
Bug: angleproject:4426
Change-Id: Ia0466738eb7de78c0c3b53e61e2f2bc6831bbcca
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/41688
Kokoro-Presubmit: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Vulkan/VkPipelineCache.cpp b/src/Vulkan/VkPipelineCache.cpp
index 9ee5723..b9fb0d3 100644
--- a/src/Vulkan/VkPipelineCache.cpp
+++ b/src/Vulkan/VkPipelineCache.cpp
@@ -93,7 +93,7 @@
}
}
- return (info < specializationInfo.info);
+ return false;
}
PipelineCache::SpirvShaderKey::SpirvShaderKey(const VkShaderStageFlagBits pipelineStage,