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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user