diff options
author | Jason Ekstrand <[email protected]> | 2018-10-20 10:05:33 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-11-08 10:09:06 -0600 |
commit | 6b2918709ab785be53607ff65ae203b2e88594b4 (patch) | |
tree | fb3369734746b7c2e2939997fa47f193f843df79 /src/intel/compiler/brw_vec4.h | |
parent | c472ad82e48e139e03ed28a7a98481814260d08e (diff) |
intel/fs,vec4: Clean up a repeated pattern with SSBOs
Everywhere we handle SSBO intrinsics, we have exactly the same pattern
for computing the index so we may as well make a helper for it. We also
add a get_nir_src_imm to vec4 and use it for SSBO offsets.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_vec4.h')
-rw-r--r-- | src/intel/compiler/brw_vec4.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_vec4.h b/src/intel/compiler/brw_vec4.h index 71880db969e..8ef0b5319b0 100644 --- a/src/intel/compiler/brw_vec4.h +++ b/src/intel/compiler/brw_vec4.h @@ -338,6 +338,7 @@ public: virtual void nir_emit_block(nir_block *block); virtual void nir_emit_instr(nir_instr *instr); virtual void nir_emit_load_const(nir_load_const_instr *instr); + src_reg get_nir_ssbo_intrinsic_index(nir_intrinsic_instr *instr); virtual void nir_emit_intrinsic(nir_intrinsic_instr *instr); virtual void nir_emit_alu(nir_alu_instr *instr); virtual void nir_emit_jump(nir_jump_instr *instr); @@ -354,6 +355,7 @@ public: unsigned num_components = 4); src_reg get_nir_src(const nir_src &src, unsigned num_components = 4); + src_reg get_nir_src_imm(const nir_src &src); src_reg get_indirect_offset(nir_intrinsic_instr *instr); dst_reg *nir_locals; |