Commit ecab580d authored by Emma Anholt's avatar Emma Anholt Committed by Marge Bot
Browse files

panfrost: Fix OOB array access compiler warning.



-1 is used to select "choose the dest type", but we were dereffing src[-1]
anyway and the compiler is not a fan.
Reviewed-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <mesa/mesa!6462>
parent ccb5e0b0
......@@ -106,7 +106,7 @@ bi_get_component_count(bi_instruction *ins, signed src)
return (src <= 0) ? ins->vector_channels : 1;
} else {
unsigned dest_bytes = nir_alu_type_get_type_size(ins->dest_type);
unsigned src_bytes = nir_alu_type_get_type_size(ins->src_types[src]);
unsigned src_bytes = nir_alu_type_get_type_size(ins->src_types[MAX2(src, 0)]);
/* If there's either f32 on either end, it's only a single
* component, etc. */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment