summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2020-03-23 13:49:08 +0000
committerEric Engestrom <[email protected]>2020-03-25 15:32:18 +0100
commitca17bf0f812e9bf09dabdada3df7f911c64e7590 (patch)
tree0717537c2b59ab1e167f5e47996e7419de58fced /src/amd
parentc2601fe16b2f23b5cd6b23159d7ff2a3966920b1 (diff)
aco: fix boolean undef regclass
Cc: <[email protected]> Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> 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 17c7f4e30ed8f7a04ae3ad80e39cfbdf8d8ea46c)
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/compiler/aco_instruction_selection_setup.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp
index 78d06ae6f8e..347b32deb60 100644
--- a/src/amd/compiler/aco_instruction_selection_setup.cpp
+++ b/src/amd/compiler/aco_instruction_selection_setup.cpp
@@ -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;
}