From cb682a1cdd0485df9bb842b33fdb0f0d37f9c206 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 15 Jul 2022 05:19:12 -0500 Subject: [PATCH] anv: Don't use the wrong ARRAY_SIZE Even though this doesn't change anything, it's not good to use an ARRAY_SIZE for one array to iterate over another. Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index dbbfc9540ed..c45954cd3eb 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -577,7 +577,7 @@ anv_pipeline_hash_graphics(struct anv_graphics_pipeline *pipeline, const bool rba = pipeline->base.device->robust_buffer_access; _mesa_sha1_update(&ctx, &rba, sizeof(rba)); - for (unsigned s = 0; s < ARRAY_SIZE(pipeline->shaders); s++) { + for (uint32_t s = 0; s < ANV_GRAPHICS_SHADER_STAGE_COUNT; s++) { if (stages[s].info) { _mesa_sha1_update(&ctx, stages[s].shader_sha1, sizeof(stages[s].shader_sha1));