intel/compiler: implement nir_instr_type_load_const for 16-bit constants
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:

committed by
Iago Toral Quiroga

parent
939501c8ed
commit
e5fc3c0717
@@ -1511,6 +1511,11 @@ fs_visitor::nir_emit_load_const(const fs_builder &bld,
|
||||
fs_reg reg = bld.vgrf(reg_type, instr->def.num_components);
|
||||
|
||||
switch (instr->def.bit_size) {
|
||||
case 16:
|
||||
for (unsigned i = 0; i < instr->def.num_components; i++)
|
||||
bld.MOV(offset(reg, bld, i), brw_imm_w(instr->value.i16[i]));
|
||||
break;
|
||||
|
||||
case 32:
|
||||
for (unsigned i = 0; i < instr->def.num_components; i++)
|
||||
bld.MOV(offset(reg, bld, i), brw_imm_d(instr->value.i32[i]));
|
||||
|
Reference in New Issue
Block a user