ac/nir: implement 8-bit nir_load_const_instr

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
Rhys Perry
2018-12-06 14:41:11 +00:00
parent 0ca550e01a
commit c4ea20c0a0
+4
View 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);