From 4846d53b18a768390050ae168965f9619a2fafb2 Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Fri, 10 Jun 2022 12:31:08 +0300 Subject: [PATCH] turnip: Fix out-of-bounds builder->shader_iova access src/freedreno/vulkan/tu_pipeline.c:1722:72: runtime error: index 5 out of bounds for type 'uint64_t [5]' Fixes: 05329d7f9acabbc9306c9538a30b502d4c580d38 ("tu: Implement pipeline caching with shared Vulkan cache") Signed-off-by: Danylo Piliaiev Part-of: --- src/freedreno/vulkan/tu_pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index 9ad4a39db0e..60278313367 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -1713,7 +1713,7 @@ tu6_emit_program(struct tu_cs *cs, stage++; } - for (; stage < ARRAY_SIZE(builder->shaders->variants); stage++) { + for (; stage < ARRAY_SIZE(builder->shader_iova); stage++) { const struct ir3_shader_variant *xs = builder->shaders->variants[stage]; if (stage == MESA_SHADER_FRAGMENT && binning_pass)