diff options
author | Jason Ekstrand <[email protected]> | 2018-03-19 11:48:11 -0700 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-03-23 13:48:11 +1100 |
commit | 884d27bcf688d36c3bbe01bceca525595add3b33 (patch) | |
tree | 25596b60698e2558c1d57ab9d18412e8b73afcfd /src/intel | |
parent | fa683385de515c24f4c7cf62dfce8a16faa4b2be (diff) |
nir: Rename image intrinsics to image_var
Generated with
git grep -l nir_intrinsic_image | xargs \
sed -i 's/nir_intrinsic_image/nir_intrinsic_image_var/g'
and some manual fixing in nir_intrinsics.h
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/compiler/brw_fs_nir.cpp | 46 | ||||
-rw-r--r-- | src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 24 | ||||
-rw-r--r-- | src/intel/vulkan/anv_nir_lower_input_attachments.c | 2 |
3 files changed, 36 insertions, 36 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index dbd2105f7e9..f5d53992598 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -1697,23 +1697,23 @@ static unsigned get_image_atomic_op(nir_intrinsic_op op, const glsl_type *type) { switch (op) { - case nir_intrinsic_image_atomic_add: + case nir_intrinsic_image_var_atomic_add: return BRW_AOP_ADD; - case nir_intrinsic_image_atomic_min: + case nir_intrinsic_image_var_atomic_min: return (get_image_base_type(type) == BRW_REGISTER_TYPE_D ? BRW_AOP_IMIN : BRW_AOP_UMIN); - case nir_intrinsic_image_atomic_max: + case nir_intrinsic_image_var_atomic_max: return (get_image_base_type(type) == BRW_REGISTER_TYPE_D ? BRW_AOP_IMAX : BRW_AOP_UMAX); - case nir_intrinsic_image_atomic_and: + case nir_intrinsic_image_var_atomic_and: return BRW_AOP_AND; - case nir_intrinsic_image_atomic_or: + case nir_intrinsic_image_var_atomic_or: return BRW_AOP_OR; - case nir_intrinsic_image_atomic_xor: + case nir_intrinsic_image_var_atomic_xor: return BRW_AOP_XOR; - case nir_intrinsic_image_atomic_exchange: + case nir_intrinsic_image_var_atomic_exchange: return BRW_AOP_MOV; - case nir_intrinsic_image_atomic_comp_swap: + case nir_intrinsic_image_var_atomic_comp_swap: return BRW_AOP_CMPWR; default: unreachable("Not reachable."); @@ -3795,20 +3795,20 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr dest = get_nir_dest(instr->dest); switch (instr->intrinsic) { - case nir_intrinsic_image_load: - case nir_intrinsic_image_store: - case nir_intrinsic_image_atomic_add: - case nir_intrinsic_image_atomic_min: - case nir_intrinsic_image_atomic_max: - case nir_intrinsic_image_atomic_and: - case nir_intrinsic_image_atomic_or: - case nir_intrinsic_image_atomic_xor: - case nir_intrinsic_image_atomic_exchange: - case nir_intrinsic_image_atomic_comp_swap: { + case nir_intrinsic_image_var_load: + case nir_intrinsic_image_var_store: + case nir_intrinsic_image_var_atomic_add: + case nir_intrinsic_image_var_atomic_min: + case nir_intrinsic_image_var_atomic_max: + case nir_intrinsic_image_var_atomic_and: + case nir_intrinsic_image_var_atomic_or: + case nir_intrinsic_image_var_atomic_xor: + case nir_intrinsic_image_var_atomic_exchange: + case nir_intrinsic_image_var_atomic_comp_swap: { using namespace image_access; if (stage == MESA_SHADER_FRAGMENT && - instr->intrinsic != nir_intrinsic_image_load) + instr->intrinsic != nir_intrinsic_image_var_load) brw_wm_prog_data(prog_data)->has_side_effects = true; /* Get the referenced image variable and type. */ @@ -3835,10 +3835,10 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr fs_reg tmp; /* Emit an image load, store or atomic op. */ - if (instr->intrinsic == nir_intrinsic_image_load) + if (instr->intrinsic == nir_intrinsic_image_var_load) tmp = emit_image_load(bld, image, addr, surf_dims, arr_dims, format); - else if (instr->intrinsic == nir_intrinsic_image_store) + else if (instr->intrinsic == nir_intrinsic_image_var_store) emit_image_store(bld, image, addr, src0, surf_dims, arr_dims, var->data.image.write_only ? GL_NONE : format); @@ -3897,7 +3897,7 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr break; } - case nir_intrinsic_image_size: { + case nir_intrinsic_image_var_size: { /* Get the referenced image variable and type. */ const nir_variable *var = instr->variables[0]->var; const glsl_type *type = var->type->without_array(); @@ -3941,7 +3941,7 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr break; } - case nir_intrinsic_image_samples: + case nir_intrinsic_image_var_samples: /* The driver does not support multi-sampled images. */ bld.MOV(retype(dest, BRW_REGISTER_TYPE_D), brw_imm_d(1)); break; diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index acabc5426be..d5a08f712f1 100644 --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c @@ -67,18 +67,18 @@ get_used_bindings_block(nir_block *block, nir_intrinsic_binding(intrin)); break; - case nir_intrinsic_image_load: - case nir_intrinsic_image_store: - case nir_intrinsic_image_atomic_add: - case nir_intrinsic_image_atomic_min: - case nir_intrinsic_image_atomic_max: - case nir_intrinsic_image_atomic_and: - case nir_intrinsic_image_atomic_or: - case nir_intrinsic_image_atomic_xor: - case nir_intrinsic_image_atomic_exchange: - case nir_intrinsic_image_atomic_comp_swap: - case nir_intrinsic_image_size: - case nir_intrinsic_image_samples: + case nir_intrinsic_image_var_load: + case nir_intrinsic_image_var_store: + case nir_intrinsic_image_var_atomic_add: + case nir_intrinsic_image_var_atomic_min: + case nir_intrinsic_image_var_atomic_max: + case nir_intrinsic_image_var_atomic_and: + case nir_intrinsic_image_var_atomic_or: + case nir_intrinsic_image_var_atomic_xor: + case nir_intrinsic_image_var_atomic_exchange: + case nir_intrinsic_image_var_atomic_comp_swap: + case nir_intrinsic_image_var_size: + case nir_intrinsic_image_var_samples: add_var_binding(state, intrin->variables[0]->var); break; diff --git a/src/intel/vulkan/anv_nir_lower_input_attachments.c b/src/intel/vulkan/anv_nir_lower_input_attachments.c index 58b9b340a42..6dc4f90853b 100644 --- a/src/intel/vulkan/anv_nir_lower_input_attachments.c +++ b/src/intel/vulkan/anv_nir_lower_input_attachments.c @@ -127,7 +127,7 @@ anv_nir_lower_input_attachments(nir_shader *shader) nir_intrinsic_instr *load = nir_instr_as_intrinsic(instr); - if (load->intrinsic != nir_intrinsic_image_load) + if (load->intrinsic != nir_intrinsic_image_var_load) continue; try_lower_input_load(function->impl, load); |