ac/nir: implement 8-bit nir_load_const_instr
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 6 Dec 2018 14:41:11 +0000 (14:41 +0000)
committerRhys Perry <pendingchaos02@gmail.com>
Tue, 19 Feb 2019 11:03:33 +0000 (11:03 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/common/ac_nir_to_llvm.c

index 946ea9a4a8a6c79e20ca96a2dd2588bf93fb8794..9646a65df1e974d202612912475bc5d485b9a439 100644 (file)
@@ -1114,6 +1114,10 @@ static void visit_load_const(struct ac_nir_context *ctx,
 
        for (unsigned i = 0; i < instr->def.num_components; ++i) {
                switch (instr->def.bit_size) {
+               case 8:
+                       values[i] = LLVMConstInt(element_type,
+                                                instr->value.u8[i], false);
+                       break;
                case 16:
                        values[i] = LLVMConstInt(element_type,
                                                 instr->value.u16[i], false);