diff options
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 54 | ||||
-rw-r--r-- | src/compiler/nir/nir_intrinsics.h | 24 | ||||
-rw-r--r-- | src/compiler/nir/nir_lower_samplers_as_deref.c | 22 | ||||
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 4 |
4 files changed, 52 insertions, 52 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index be8cc33e067..65c5576d1a1 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -667,43 +667,43 @@ nir_visitor::visit(ir_call *ir) op = nir_intrinsic_atomic_counter_comp_swap_var; break; case ir_intrinsic_image_load: - op = nir_intrinsic_image_load; + op = nir_intrinsic_image_var_load; break; case ir_intrinsic_image_store: - op = nir_intrinsic_image_store; + op = nir_intrinsic_image_var_store; break; case ir_intrinsic_image_atomic_add: - op = nir_intrinsic_image_atomic_add; + op = nir_intrinsic_image_var_atomic_add; break; case ir_intrinsic_image_atomic_min: - op = nir_intrinsic_image_atomic_min; + op = nir_intrinsic_image_var_atomic_min; break; case ir_intrinsic_image_atomic_max: - op = nir_intrinsic_image_atomic_max; + op = nir_intrinsic_image_var_atomic_max; break; case ir_intrinsic_image_atomic_and: - op = nir_intrinsic_image_atomic_and; + op = nir_intrinsic_image_var_atomic_and; break; case ir_intrinsic_image_atomic_or: - op = nir_intrinsic_image_atomic_or; + op = nir_intrinsic_image_var_atomic_or; break; case ir_intrinsic_image_atomic_xor: - op = nir_intrinsic_image_atomic_xor; + op = nir_intrinsic_image_var_atomic_xor; break; case ir_intrinsic_image_atomic_exchange: - op = nir_intrinsic_image_atomic_exchange; + op = nir_intrinsic_image_var_atomic_exchange; break; case ir_intrinsic_image_atomic_comp_swap: - op = nir_intrinsic_image_atomic_comp_swap; + op = nir_intrinsic_image_var_atomic_comp_swap; break; case ir_intrinsic_memory_barrier: op = nir_intrinsic_memory_barrier; break; case ir_intrinsic_image_size: - op = nir_intrinsic_image_size; + op = nir_intrinsic_image_var_size; break; case ir_intrinsic_image_samples: - op = nir_intrinsic_image_samples; + op = nir_intrinsic_image_var_samples; break; case ir_intrinsic_ssbo_store: op = nir_intrinsic_store_ssbo; @@ -872,18 +872,18 @@ nir_visitor::visit(ir_call *ir) nir_builder_instr_insert(&b, &instr->instr); 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_samples: - case nir_intrinsic_image_size: { + 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_samples: + case nir_intrinsic_image_var_size: { nir_ssa_undef_instr *instr_undef = nir_ssa_undef_instr_create(shader, 1, 32); nir_builder_instr_insert(&b, &instr_undef->instr); @@ -900,14 +900,14 @@ nir_visitor::visit(ir_call *ir) /* Set the intrinsic destination. */ if (ir->return_deref) { unsigned num_components = ir->return_deref->type->vector_elements; - if (instr->intrinsic == nir_intrinsic_image_size) + if (instr->intrinsic == nir_intrinsic_image_var_size) instr->num_components = num_components; nir_ssa_dest_init(&instr->instr, &instr->dest, num_components, 32, NULL); } - if (op == nir_intrinsic_image_size || - op == nir_intrinsic_image_samples) { + if (op == nir_intrinsic_image_var_size || + op == nir_intrinsic_image_var_samples) { nir_builder_instr_insert(&b, &instr->instr); break; } diff --git a/src/compiler/nir/nir_intrinsics.h b/src/compiler/nir/nir_intrinsics.h index 7b737559d5a..8f3d3bcfa23 100644 --- a/src/compiler/nir/nir_intrinsics.h +++ b/src/compiler/nir/nir_intrinsics.h @@ -252,20 +252,20 @@ ATOMIC3(atomic_counter_comp_swap) * either one or two additional scalar arguments with the same meaning as in * the ARB_shader_image_load_store specification. */ -INTRINSIC(image_load, 2, ARR(4, 1), true, 4, 1, 0, xx, xx, xx, +INTRINSIC(image_var_load, 2, ARR(4, 1), true, 4, 1, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE) -INTRINSIC(image_store, 3, ARR(4, 1, 4), false, 0, 1, 0, xx, xx, xx, 0) -INTRINSIC(image_atomic_add, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) -INTRINSIC(image_atomic_min, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) -INTRINSIC(image_atomic_max, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) -INTRINSIC(image_atomic_and, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) -INTRINSIC(image_atomic_or, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) -INTRINSIC(image_atomic_xor, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) -INTRINSIC(image_atomic_exchange, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) -INTRINSIC(image_atomic_comp_swap, 4, ARR(4, 1, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) -INTRINSIC(image_size, 0, ARR(0), true, 0, 1, 0, xx, xx, xx, +INTRINSIC(image_var_store, 3, ARR(4, 1, 4), false, 0, 1, 0, xx, xx, xx, 0) +INTRINSIC(image_var_atomic_add, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) +INTRINSIC(image_var_atomic_min, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) +INTRINSIC(image_var_atomic_max, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) +INTRINSIC(image_var_atomic_and, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) +INTRINSIC(image_var_atomic_or, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) +INTRINSIC(image_var_atomic_xor, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) +INTRINSIC(image_var_atomic_exchange, 3, ARR(4, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) +INTRINSIC(image_var_atomic_comp_swap, 4, ARR(4, 1, 1, 1), true, 1, 1, 0, xx, xx, xx, 0) +INTRINSIC(image_var_size, 0, ARR(0), true, 0, 1, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE | NIR_INTRINSIC_CAN_REORDER) -INTRINSIC(image_samples, 0, ARR(0), true, 1, 1, 0, xx, xx, xx, +INTRINSIC(image_var_samples, 0, ARR(0), true, 1, 1, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE | NIR_INTRINSIC_CAN_REORDER) /* diff --git a/src/compiler/nir/nir_lower_samplers_as_deref.c b/src/compiler/nir/nir_lower_samplers_as_deref.c index 3e819f7fa75..b1272e25a92 100644 --- a/src/compiler/nir/nir_lower_samplers_as_deref.c +++ b/src/compiler/nir/nir_lower_samplers_as_deref.c @@ -183,17 +183,17 @@ lower_intrinsic(nir_intrinsic_instr *instr, struct lower_samplers_as_deref_state *state, nir_builder *b) { - if (instr->intrinsic == nir_intrinsic_image_load || - instr->intrinsic == nir_intrinsic_image_store || - instr->intrinsic == nir_intrinsic_image_atomic_add || - instr->intrinsic == nir_intrinsic_image_atomic_min || - instr->intrinsic == nir_intrinsic_image_atomic_max || - instr->intrinsic == nir_intrinsic_image_atomic_and || - instr->intrinsic == nir_intrinsic_image_atomic_or || - instr->intrinsic == nir_intrinsic_image_atomic_xor || - instr->intrinsic == nir_intrinsic_image_atomic_exchange || - instr->intrinsic == nir_intrinsic_image_atomic_comp_swap || - instr->intrinsic == nir_intrinsic_image_size) { + if (instr->intrinsic == nir_intrinsic_image_var_load || + instr->intrinsic == nir_intrinsic_image_var_store || + instr->intrinsic == nir_intrinsic_image_var_atomic_add || + instr->intrinsic == nir_intrinsic_image_var_atomic_min || + instr->intrinsic == nir_intrinsic_image_var_atomic_max || + instr->intrinsic == nir_intrinsic_image_var_atomic_and || + instr->intrinsic == nir_intrinsic_image_var_atomic_or || + instr->intrinsic == nir_intrinsic_image_var_atomic_xor || + instr->intrinsic == nir_intrinsic_image_var_atomic_exchange || + instr->intrinsic == nir_intrinsic_image_var_atomic_comp_swap || + instr->intrinsic == nir_intrinsic_image_var_size) { b->cursor = nir_before_instr(&instr->instr); lower_deref(instr->variables[0], state, b); return true; diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index f06dca90efd..e91d1e3dfaa 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -2353,7 +2353,7 @@ vtn_handle_image(struct vtn_builder *b, SpvOp opcode, nir_intrinsic_op op; switch (opcode) { -#define OP(S, N) case SpvOp##S: op = nir_intrinsic_image_##N; break; +#define OP(S, N) case SpvOp##S: op = nir_intrinsic_image_var_##N; break; OP(ImageQuerySize, size) OP(ImageRead, load) OP(ImageWrite, store) @@ -2433,7 +2433,7 @@ vtn_handle_image(struct vtn_builder *b, SpvOp opcode, unsigned dest_components = nir_intrinsic_infos[intrin->intrinsic].dest_components; - if (intrin->intrinsic == nir_intrinsic_image_size) { + if (intrin->intrinsic == nir_intrinsic_image_var_size) { dest_components = intrin->num_components = glsl_get_vector_elements(type->type); } |