nir: Drop "SSA" from NIR language
Everything is SSA now.
sed -e 's/nir_ssa_def/nir_def/g' \
-e 's/nir_ssa_undef/nir_undef/g' \
-e 's/nir_ssa_scalar/nir_scalar/g' \
-e 's/nir_src_rewrite_ssa/nir_src_rewrite/g' \
-e 's/nir_gather_ssa_types/nir_gather_types/g' \
-i $(git grep -l nir | grep -v relnotes)
git mv src/compiler/nir/nir_gather_ssa_types.c \
src/compiler/nir/nir_gather_types.c
ninja -C build/ clang-format
cd src/compiler/nir && find *.c *.h -type f -exec clang-format -i \{} \;
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24585>
This commit is contained in:
@@ -45,11 +45,11 @@ static void lower_vulkan_resource_index(nir_builder *b,
|
||||
unsigned binding = nir_intrinsic_binding(intr);
|
||||
unsigned desc_type = nir_intrinsic_desc_type(intr);
|
||||
|
||||
nir_ssa_def *def = nir_vec3(b,
|
||||
nir_def *def = nir_vec3(b,
|
||||
nir_imm_int(b, desc_set),
|
||||
nir_imm_int(b, binding),
|
||||
nir_imm_int(b, desc_type));
|
||||
nir_ssa_def_rewrite_uses(&intr->dest.ssa, def);
|
||||
nir_def_rewrite_uses(&intr->dest.ssa, def);
|
||||
nir_instr_remove(&intr->instr);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ static void lower_load_global_constant_to_scalar(nir_builder *b,
|
||||
|
||||
assert(intr->num_components > 1);
|
||||
|
||||
nir_ssa_def *loads[NIR_MAX_VEC_COMPONENTS];
|
||||
nir_def *loads[NIR_MAX_VEC_COMPONENTS];
|
||||
|
||||
for (uint8_t i = 0; i < intr->num_components; i++) {
|
||||
nir_intrinsic_instr *chan_intr =
|
||||
@@ -86,7 +86,7 @@ static void lower_load_global_constant_to_scalar(nir_builder *b,
|
||||
loads[i] = &chan_intr->dest.ssa;
|
||||
}
|
||||
|
||||
nir_ssa_def_rewrite_uses(&intr->dest.ssa,
|
||||
nir_def_rewrite_uses(&intr->dest.ssa,
|
||||
nir_vec(b, loads, intr->num_components));
|
||||
nir_instr_remove(&intr->instr);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ static void insert_pfo(nir_builder *b,
|
||||
/* TODO: Verify type is vec4. */
|
||||
|
||||
/* Pack the output color components into U8888 format. */
|
||||
nir_ssa_def *new_output_src_ssa = nir_pack_unorm_4x8(b, output_src->ssa);
|
||||
nir_def *new_output_src_ssa = nir_pack_unorm_4x8(b, output_src->ssa);
|
||||
nir_src new_output_src = nir_src_for_ssa(new_output_src_ssa);
|
||||
|
||||
/* Update the store_output intrinsic. */
|
||||
|
||||
@@ -723,7 +723,7 @@ static inline void rogue_feedback_used_regs(rogue_build_ctx *ctx,
|
||||
rogue_count_used_regs(shader, ROGUE_REG_CLASS_INTERNAL);
|
||||
}
|
||||
|
||||
static bool ssa_def_cb(nir_ssa_def *ssa, void *state)
|
||||
static bool ssa_def_cb(nir_def *ssa, void *state)
|
||||
{
|
||||
rogue_shader *shader = (rogue_shader *)state;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user