mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
pan/mdg: Return false instead of asserting in mir_args_ssa
mir_args_ssa asserted that the given number of arguments to use is greater than or equal to the actual number, but this is not checked by callers, so instead of crashing return false to mark failure. Fixes the local memory atomics OpenCL tests in Piglit. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8264>
This commit is contained in:
parent
e5e8a628c2
commit
b7f2619798
1 changed files with 3 additions and 1 deletions
|
|
@ -55,7 +55,9 @@ static bool
|
|||
mir_args_ssa(nir_ssa_scalar s, unsigned count)
|
||||
{
|
||||
nir_alu_instr *alu = nir_instr_as_alu(s.def->parent_instr);
|
||||
assert(count <= nir_op_infos[alu->op].num_inputs);
|
||||
|
||||
if (count > nir_op_infos[alu->op].num_inputs)
|
||||
return false;
|
||||
|
||||
for (unsigned i = 0; i < count; ++i) {
|
||||
if (!alu->src[i].src.is_ssa)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue