Fix render pass cache when compiling pipelines;

Comparing the lower 32 bits to the full hash was producing false
negatives and causing unnecessary render pass creation when creating
pipelines.
This commit is contained in:
bjorn 2024-01-09 14:53:27 -08:00
parent f1530e4d29
commit 83f106b89f
1 changed files with 1 additions and 1 deletions

View File

@ -2852,7 +2852,7 @@ static VkRenderPass getCachedRenderPass(gpu_pass_info* pass, bool exact) {
uint32_t cols = COUNTOF(state.renderpasses[0]);
gpu_cache_entry* row = state.renderpasses[hash & (rows - 1)];
for (uint32_t i = 0; i < cols && row[i].object; i++) {
if ((row[i].hash & mask) == hash) {
if ((row[i].hash & mask) == (hash & mask)) {
gpu_cache_entry entry = row[i];
if (i > 0) {
for (uint32_t j = i; j >= 1; j--) {