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: 05329d7f9a
("tu: Implement pipeline caching with shared Vulkan cache")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16967>
This commit is contained in:
Danylo Piliaiev 2022-06-10 12:31:08 +03:00 committed by Marge Bot
parent 003d052810
commit 4846d53b18

View file

@ -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)