diff options
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 28 |
2 files changed, 3 insertions, 26 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index e589c9646b5..ad3d9866d53 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -583,7 +583,6 @@ public: void nir_emit_alu(nir_alu_instr *instr); void nir_emit_intrinsic(nir_intrinsic_instr *instr); void nir_emit_texture(nir_tex_instr *instr); - void nir_emit_load_const(nir_load_const_instr *instr); void nir_emit_jump(nir_jump_instr *instr); fs_reg get_nir_src(nir_src src); fs_reg get_nir_alu_src(nir_alu_instr *instr, unsigned src); diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index c218b722f8d..4c08cfdb6ad 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -392,7 +392,9 @@ fs_visitor::nir_emit_instr(nir_instr *instr) break; case nir_instr_type_load_const: - nir_emit_load_const(nir_instr_as_load_const(instr)); + /* We can hit these, but we do nothing now and use them as + * immediates later. + */ break; case nir_instr_type_jump: @@ -1702,30 +1704,6 @@ fs_visitor::nir_emit_texture(nir_tex_instr *instr) } void -fs_visitor::nir_emit_load_const(nir_load_const_instr *instr) -{ - /* Bail on SSA constant loads. These are used for immediates. */ - if (instr->dest.is_ssa) - return; - - fs_reg dest = get_nir_dest(instr->dest); - dest.type = BRW_REGISTER_TYPE_UD; - if (instr->array_elems == 0) { - for (unsigned i = 0; i < instr->num_components; i++) { - emit(MOV(dest, fs_reg(instr->value.u[i]))); - dest.reg_offset++; - } - } else { - for (unsigned i = 0; i < instr->array_elems; i++) { - for (unsigned j = 0; j < instr->num_components; j++) { - emit(MOV(dest, fs_reg(instr->array[i].u[j]))); - dest.reg_offset++; - } - } - } -} - -void fs_visitor::nir_emit_jump(nir_jump_instr *instr) { switch (instr->type) { |