mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
radeonsi: remove si_shader_context::is_gs_copy_shader
It has become redundant. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
3b2516721b
commit
ffe4e829b0
2 changed files with 4 additions and 8 deletions
|
|
@ -2666,7 +2666,7 @@ static void si_llvm_emit_vs_epilogue(struct lp_build_tgsi_context *bld_base)
|
||||||
struct si_shader_output_values *outputs = NULL;
|
struct si_shader_output_values *outputs = NULL;
|
||||||
int i,j;
|
int i,j;
|
||||||
|
|
||||||
assert(!ctx->is_gs_copy_shader);
|
assert(!ctx->shader->is_gs_copy_shader);
|
||||||
|
|
||||||
outputs = MALLOC((info->num_outputs + 1) * sizeof(outputs[0]));
|
outputs = MALLOC((info->num_outputs + 1) * sizeof(outputs[0]));
|
||||||
|
|
||||||
|
|
@ -5312,7 +5312,7 @@ static void create_function(struct si_shader_context *ctx)
|
||||||
params[SI_PARAM_LS_OUT_LAYOUT] = ctx->i32;
|
params[SI_PARAM_LS_OUT_LAYOUT] = ctx->i32;
|
||||||
num_params = SI_PARAM_LS_OUT_LAYOUT+1;
|
num_params = SI_PARAM_LS_OUT_LAYOUT+1;
|
||||||
} else {
|
} else {
|
||||||
if (ctx->is_gs_copy_shader) {
|
if (shader->is_gs_copy_shader) {
|
||||||
num_params = SI_PARAM_RW_BUFFERS+1;
|
num_params = SI_PARAM_RW_BUFFERS+1;
|
||||||
} else {
|
} else {
|
||||||
params[SI_PARAM_VS_STATE_BITS] = ctx->i32;
|
params[SI_PARAM_VS_STATE_BITS] = ctx->i32;
|
||||||
|
|
@ -5332,7 +5332,7 @@ static void create_function(struct si_shader_context *ctx)
|
||||||
params[ctx->param_vs_prim_id = num_params++] = ctx->i32;
|
params[ctx->param_vs_prim_id = num_params++] = ctx->i32;
|
||||||
params[ctx->param_instance_id = num_params++] = ctx->i32;
|
params[ctx->param_instance_id = num_params++] = ctx->i32;
|
||||||
|
|
||||||
if (!ctx->is_gs_copy_shader) {
|
if (!shader->is_gs_copy_shader) {
|
||||||
/* Vertex load indices. */
|
/* Vertex load indices. */
|
||||||
ctx->param_vertex_index0 = num_params;
|
ctx->param_vertex_index0 = num_params;
|
||||||
|
|
||||||
|
|
@ -5340,9 +5340,7 @@ static void create_function(struct si_shader_context *ctx)
|
||||||
params[num_params++] = ctx->i32;
|
params[num_params++] = ctx->i32;
|
||||||
|
|
||||||
num_prolog_vgprs += shader->selector->info.num_inputs;
|
num_prolog_vgprs += shader->selector->info.num_inputs;
|
||||||
}
|
|
||||||
|
|
||||||
if (!ctx->is_gs_copy_shader) {
|
|
||||||
/* PrimitiveID output. */
|
/* PrimitiveID output. */
|
||||||
if (!shader->key.vs.as_es && !shader->key.vs.as_ls)
|
if (!shader->key.vs.as_es && !shader->key.vs.as_ls)
|
||||||
for (i = 0; i <= VS_EPILOG_PRIMID_LOC; i++)
|
for (i = 0; i <= VS_EPILOG_PRIMID_LOC; i++)
|
||||||
|
|
@ -5583,7 +5581,7 @@ static void preload_ring_buffers(struct si_shader_context *ctx)
|
||||||
build_indexed_load_const(ctx, buf_ptr, offset);
|
build_indexed_load_const(ctx, buf_ptr, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->is_gs_copy_shader) {
|
if (ctx->shader->is_gs_copy_shader) {
|
||||||
LLVMValueRef offset = lp_build_const_int32(gallivm, SI_VS_RING_GSVS);
|
LLVMValueRef offset = lp_build_const_int32(gallivm, SI_VS_RING_GSVS);
|
||||||
|
|
||||||
ctx->gsvs_ring[0] =
|
ctx->gsvs_ring[0] =
|
||||||
|
|
@ -6107,7 +6105,6 @@ si_generate_gs_copy_shader(struct si_screen *sscreen,
|
||||||
|
|
||||||
si_init_shader_ctx(&ctx, sscreen, shader, tm);
|
si_init_shader_ctx(&ctx, sscreen, shader, tm);
|
||||||
ctx.type = PIPE_SHADER_VERTEX;
|
ctx.type = PIPE_SHADER_VERTEX;
|
||||||
ctx.is_gs_copy_shader = true;
|
|
||||||
|
|
||||||
create_meta_data(&ctx);
|
create_meta_data(&ctx);
|
||||||
create_function(&ctx);
|
create_function(&ctx);
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ struct si_shader_context {
|
||||||
struct si_screen *screen;
|
struct si_screen *screen;
|
||||||
|
|
||||||
unsigned type; /* PIPE_SHADER_* specifies the type of shader. */
|
unsigned type; /* PIPE_SHADER_* specifies the type of shader. */
|
||||||
bool is_gs_copy_shader;
|
|
||||||
|
|
||||||
/* Whether the prolog will be compiled separately. */
|
/* Whether the prolog will be compiled separately. */
|
||||||
bool separate_prolog;
|
bool separate_prolog;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue