[Mesa-dev] [PATCH 2/3] ac: rename ac_eliminate_const_vs_outputs -> ac_optimize_vs_outputs
Marek Olšák
maraeo at gmail.com
Mon May 1 12:43:00 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
---
src/amd/common/ac_llvm_build.c | 10 +++++-----
src/amd/common/ac_llvm_build.h | 10 +++++-----
src/amd/common/ac_nir_to_llvm.c | 10 +++++-----
src/gallium/drivers/radeonsi/si_shader.c | 10 +++++-----
4 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index 4856c06..ada348d 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -1240,25 +1240,25 @@ static bool ac_eliminate_const_output(uint8_t *vs_output_param_offset,
for (i = 0; i < num_outputs; i++) {
if (vs_output_param_offset[i] == exp->offset) {
vs_output_param_offset[i] =
AC_EXP_PARAM_DEFAULT_VAL_0000 + default_val;
break;
}
}
return true;
}
-void ac_eliminate_const_vs_outputs(struct ac_llvm_context *ctx,
- LLVMValueRef main_fn,
- uint8_t *vs_output_param_offset,
- uint32_t num_outputs,
- uint8_t *num_param_exports)
+void ac_optimize_vs_outputs(struct ac_llvm_context *ctx,
+ LLVMValueRef main_fn,
+ uint8_t *vs_output_param_offset,
+ uint32_t num_outputs,
+ uint8_t *num_param_exports)
{
LLVMBasicBlockRef bb;
bool removed_any = false;
struct ac_vs_exports exports;
exports.num = 0;
/* Process all LLVM instructions. */
bb = LLVMGetFirstBasicBlock(main_fn);
while (bb) {
diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h
index 1c3610a..0ecbc4a 100644
--- a/src/amd/common/ac_llvm_build.h
+++ b/src/amd/common/ac_llvm_build.h
@@ -233,20 +233,20 @@ void ac_build_kill(struct ac_llvm_context *ctx, LLVMValueRef value);
LLVMValueRef ac_build_bfe(struct ac_llvm_context *ctx, LLVMValueRef input,
LLVMValueRef offset, LLVMValueRef width,
bool is_signed);
void ac_get_image_intr_name(const char *base_name,
LLVMTypeRef data_type,
LLVMTypeRef coords_type,
LLVMTypeRef rsrc_type,
char *out_name, unsigned out_len);
-void ac_eliminate_const_vs_outputs(struct ac_llvm_context *ac,
- LLVMValueRef main_fn,
- uint8_t *vs_output_param_offset,
- uint32_t num_outputs,
- uint8_t *num_param_exports);
+void ac_optimize_vs_outputs(struct ac_llvm_context *ac,
+ LLVMValueRef main_fn,
+ uint8_t *vs_output_param_offset,
+ uint32_t num_outputs,
+ uint8_t *num_param_exports);
#ifdef __cplusplus
}
#endif
#endif
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index d9962c7..b9ba932 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -5776,25 +5776,25 @@ ac_nir_eliminate_const_vs_outputs(struct nir_to_llvm_context *ctx)
return;
outinfo = &ctx->shader_info->vs.outinfo;
}
if (ctx->stage == MESA_SHADER_TESS_EVAL) {
if (ctx->options->key.vs.as_es)
return;
outinfo = &ctx->shader_info->tes.outinfo;
}
- ac_eliminate_const_vs_outputs(&ctx->ac,
- ctx->main_function,
- outinfo->vs_output_param_offset,
- VARYING_SLOT_MAX,
- &outinfo->param_exports);
+ ac_optimize_vs_outputs(&ctx->ac,
+ ctx->main_function,
+ outinfo->vs_output_param_offset,
+ VARYING_SLOT_MAX,
+ &outinfo->param_exports);
}
static void
ac_setup_rings(struct nir_to_llvm_context *ctx)
{
if ((ctx->stage == MESA_SHADER_VERTEX && ctx->options->key.vs.as_es) ||
(ctx->stage == MESA_SHADER_TESS_EVAL && ctx->options->key.tes.as_es)) {
ctx->esgs_ring = ac_build_indexed_load_const(&ctx->ac, ctx->ring_offsets, LLVMConstInt(ctx->i32, RING_ESGS_VS, false));
}
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index b13f1b2..aa5ba8d 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -7207,25 +7207,25 @@ static void si_eliminate_const_vs_outputs(struct si_shader_context *ctx)
{
struct si_shader *shader = ctx->shader;
struct tgsi_shader_info *info = &shader->selector->info;
if ((ctx->type != PIPE_SHADER_VERTEX &&
ctx->type != PIPE_SHADER_TESS_EVAL) ||
shader->key.as_ls ||
shader->key.as_es)
return;
- ac_eliminate_const_vs_outputs(&ctx->ac,
- ctx->main_fn,
- shader->info.vs_output_param_offset,
- info->num_outputs,
- &shader->info.nr_param_exports);
+ ac_optimize_vs_outputs(&ctx->ac,
+ ctx->main_fn,
+ shader->info.vs_output_param_offset,
+ info->num_outputs,
+ &shader->info.nr_param_exports);
}
static void si_count_scratch_private_memory(struct si_shader_context *ctx)
{
ctx->shader->config.private_mem_vgprs = 0;
/* Process all LLVM instructions. */
LLVMBasicBlockRef bb = LLVMGetFirstBasicBlock(ctx->main_fn);
while (bb) {
LLVMValueRef next = LLVMGetFirstInstruction(bb);
--
2.7.4
More information about the mesa-dev
mailing list