GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

Commit b7f26197 authored by Icecream95's avatar Icecream95 Committed by Marge Bot
Browse files

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's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <mesa/mesa!8264>
parent e5e8a628
......@@ -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)
......
Markdown is supported
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