diff options
author | Kenneth Graunke <[email protected]> | 2017-11-03 14:52:05 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-11-15 09:37:32 -0800 |
commit | ff964916dc5424495a3e884e02c3b2c8f285b78b (patch) | |
tree | 4dd36238871ef6891324e6dfaa3914c3cda056fe /src/intel/compiler/brw_shader.cpp | |
parent | f48f52b0306e37d4d41dbf6a32970ee468298b2b (diff) |
i965: Use nir_lower_atomics_to_ssbos and delete ABO compiler code.
We use the same hardware mechanism for both atomic counters and SSBO
atomics, so there's really no benefit to maintaining separate code to
handle each case. Instead, we can just use Rob's shiny new NIR pass to
convert atomic_uints to SSBOs, and delete piles of code.
The ssbo_start section of the binding table becomes a combined ABO and
SSBO section, with ABOs first, then SSBOs.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_shader.cpp')
-rw-r--r-- | src/intel/compiler/brw_shader.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/intel/compiler/brw_shader.cpp b/src/intel/compiler/brw_shader.cpp index b27a71c3c27..ba61481a0af 100644 --- a/src/intel/compiler/brw_shader.cpp +++ b/src/intel/compiler/brw_shader.cpp @@ -622,38 +622,6 @@ brw_abs_immediate(enum brw_reg_type type, struct brw_reg *reg) return false; } -/** - * Get the appropriate atomic op for an image atomic intrinsic. - */ -unsigned -get_atomic_counter_op(nir_intrinsic_op op) -{ - switch (op) { - case nir_intrinsic_atomic_counter_inc: - return BRW_AOP_INC; - case nir_intrinsic_atomic_counter_dec: - return BRW_AOP_PREDEC; - case nir_intrinsic_atomic_counter_add: - return BRW_AOP_ADD; - case nir_intrinsic_atomic_counter_min: - return BRW_AOP_UMIN; - case nir_intrinsic_atomic_counter_max: - return BRW_AOP_UMAX; - case nir_intrinsic_atomic_counter_and: - return BRW_AOP_AND; - case nir_intrinsic_atomic_counter_or: - return BRW_AOP_OR; - case nir_intrinsic_atomic_counter_xor: - return BRW_AOP_XOR; - case nir_intrinsic_atomic_counter_exchange: - return BRW_AOP_MOV; - case nir_intrinsic_atomic_counter_comp_swap: - return BRW_AOP_CMPWR; - default: - unreachable("Not reachable."); - } -} - backend_shader::backend_shader(const struct brw_compiler *compiler, void *log_data, void *mem_ctx, |