diff options
Diffstat (limited to 'src/compiler/nir/nir_builder.h')
-rw-r--r-- | src/compiler/nir/nir_builder.h | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h index 36e0ae3ac63..8f7ddf1483c 100644 --- a/src/compiler/nir/nir_builder.h +++ b/src/compiler/nir/nir_builder.h @@ -610,32 +610,7 @@ nir_copy_var(nir_builder *build, nir_variable *dest, nir_variable *src) nir_builder_instr_insert(build, ©->instr); } -/* Generic builder for system values. */ -static inline nir_ssa_def * -nir_load_system_value(nir_builder *build, nir_intrinsic_op op, int index) -{ - nir_intrinsic_instr *load = nir_intrinsic_instr_create(build->shader, op); - load->num_components = nir_intrinsic_infos[op].dest_components; - load->const_index[0] = index; - nir_ssa_dest_init(&load->instr, &load->dest, - nir_intrinsic_infos[op].dest_components, 32, NULL); - nir_builder_instr_insert(build, &load->instr); - return &load->dest.ssa; -} - -/* Generate custom builders for system values. */ -#define INTRINSIC(name, num_srcs, src_components, has_dest, dest_components, \ - num_variables, num_indices, idx0, idx1, idx2, flags) -#define LAST_INTRINSIC(name) - -#define DEFINE_SYSTEM_VALUE(name) \ - static inline nir_ssa_def * \ - nir_load_##name(nir_builder *build) \ - { \ - return nir_load_system_value(build, nir_intrinsic_load_##name, 0); \ - } - -#include "nir_intrinsics.h" +#include "nir_builder_opcodes.h" static inline nir_ssa_def * nir_load_barycentric(nir_builder *build, nir_intrinsic_op op, |