panfrost: Fix blend leak for render targets 5-8
[mesa.git] / src / gallium / drivers / panfrost / pan_blend_cso.c
index b39bfa89aac09c18aefc2f1f42987b8acb9a4d38..ffda1196d046dedbfc6fc4b23aeb4e62ead7d9c3 100644 (file)
@@ -165,7 +165,7 @@ panfrost_delete_blend_state(struct pipe_context *pipe,
 {
         struct panfrost_blend_state *blend = (struct panfrost_blend_state *) cso;
 
-        for (unsigned c = 0; c < 4; ++c) {
+        for (unsigned c = 0; c < PIPE_MAX_COLOR_BUFS; ++c) {
                 struct panfrost_blend_rt *rt = &blend->rt[c];
                 _mesa_hash_table_u64_clear(rt->shaders, panfrost_delete_blend_shader);
         }