aco: fix boolean undef regclass

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4285>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4285>
(cherry picked from commit 17c7f4e30e)
This commit is contained in:
Rhys Perry 2020-03-23 13:49:08 +00:00 committed by Eric Engestrom
parent c2601fe16b
commit ca17bf0f81
2 changed files with 3 additions and 1 deletions

View file

@ -364,7 +364,7 @@
"description": "aco: fix boolean undef regclass",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": null
},

View file

@ -586,6 +586,8 @@ void init_context(isel_context *ctx, nir_shader *shader)
unsigned size = nir_instr_as_ssa_undef(instr)->def.num_components;
if (nir_instr_as_ssa_undef(instr)->def.bit_size == 64)
size *= 2;
else if (nir_instr_as_ssa_undef(instr)->def.bit_size == 1)
size *= lane_mask_size;
allocated[nir_instr_as_ssa_undef(instr)->def.index] = Temp(0, RegClass(RegType::sgpr, size));
break;
}