projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
panfrost: Fix OOB array access compiler warning.
[mesa.git]
/
src
/
panfrost
/
bifrost
/
bir.c
diff --git
a/src/panfrost/bifrost/bir.c
b/src/panfrost/bifrost/bir.c
index 3ca57f66f0efde5a939f8049eea96e633f000520..61a5ffc26471c662d515e71f1166d1501d4c1bf5 100644
(file)
--- a/
src/panfrost/bifrost/bir.c
+++ b/
src/panfrost/bifrost/bir.c
@@
-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);
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. */
/* If there's either f32 on either end, it's only a single
* component, etc. */