r600: Drop nr_ps_max_color_exports

Prior to b652180107 ("r600g: don't snoop context state while building
shaders"), it fed into the shader key, but nothing does any more.

Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14427>
This commit is contained in:
Emma Anholt 2022-01-06 10:53:15 -08:00 committed by Marge Bot
parent 0b0b9274b6
commit a9a5b83b0a
6 changed files with 0 additions and 37 deletions

View file

@ -95,10 +95,6 @@ void print_shader_info(FILE *f , int id, struct r600_shader *shader)
PRINT_UINT_MEMBER(fs_write_all);
PRINT_UINT_MEMBER(two_side);
PRINT_UINT_MEMBER(needs_scratch_space);
/* Number of color outputs in the TGSI shader,
* sometimes it could be higher than nr_cbufs (bug?).
* Also with writes_all property on eg+ it will be set to max CB number */
PRINT_UINT_MEMBER(nr_ps_max_color_exports);
/* Real number of ps color exports compiled in the bytecode */
PRINT_UINT_MEMBER(nr_ps_color_exports);
PRINT_UINT_MEMBER(ps_color_export_mask);

View file

@ -363,7 +363,6 @@ struct r600_pipe_shader_selector {
/* TCS/VS */
uint64_t lds_patch_outputs_written_mask;
uint64_t lds_outputs_written_mask;
unsigned nr_ps_max_color_exports;
};
struct r600_pipe_sampler_state {

View file

@ -1145,12 +1145,6 @@ static int tgsi_declaration(struct r600_shader_ctx *ctx)
if (ctx->type == PIPE_SHADER_GEOMETRY) {
ctx->gs_out_ring_offset += 16;
}
} else if (ctx->type == PIPE_SHADER_FRAGMENT) {
switch (d->Semantic.Name) {
case TGSI_SEMANTIC_COLOR:
ctx->shader->nr_ps_max_color_exports++;
break;
}
}
}
ctx->shader->noutput += count;
@ -3535,7 +3529,6 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
ctx.cs_grid_size_loaded = false;
shader->nr_ps_color_exports = 0;
shader->nr_ps_max_color_exports = 0;
/* register allocations */
@ -3787,9 +3780,6 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
}
}
if (shader->fs_write_all && rscreen->b.chip_class >= EVERGREEN)
shader->nr_ps_max_color_exports = 8;
if (ctx.shader->uses_helper_invocation) {
if (ctx.bc->chip_class == CAYMAN)
r = cm_load_helper_invocation(&ctx);

View file

@ -80,10 +80,6 @@ struct r600_shader {
boolean fs_write_all;
boolean two_side;
boolean needs_scratch_space;
/* Number of color outputs in the TGSI shader,
* sometimes it could be higher than nr_cbufs (bug?).
* Also with writes_all property on eg+ it will be set to max CB number */
unsigned nr_ps_max_color_exports;
/* Real number of ps color exports compiled in the bytecode */
unsigned nr_ps_color_exports;
unsigned ps_color_export_mask;

View file

@ -915,15 +915,6 @@ int r600_shader_select(struct pipe_context *ctx,
return r;
}
/* We don't know the value of nr_ps_max_color_exports until we built
* at least one variant, so we may need to recompute the key after
* building first variant. */
if (sel->type == PIPE_SHADER_FRAGMENT &&
sel->num_shaders == 0) {
sel->nr_ps_max_color_exports = shader->shader.nr_ps_max_color_exports;
r600_shader_selector_key(ctx, sel, &key);
}
memcpy(&shader->key, &key, sizeof(key));
sel->num_shaders++;
}

View file

@ -1060,12 +1060,6 @@ void FragmentShaderFromNir::do_finalize()
sh_info().two_side = m_shaderio.two_sided();
sh_info().nlds = m_shaderio.nlds();
sh_info().nr_ps_max_color_exports = m_max_counted_color_exports;
if (sh_info().fs_write_all) {
sh_info().nr_ps_max_color_exports = m_max_color_exports;
}
if (!m_last_pixel_export) {
GPRVector v(0, {7,7,7,7});
m_last_pixel_export = new ExportInstruction(0, v, ExportInstruction::et_pixel);
@ -1075,9 +1069,6 @@ void FragmentShaderFromNir::do_finalize()
}
m_last_pixel_export->set_last();
if (sh_info().fs_write_all)
sh_info().nr_ps_max_color_exports = 8;
}
}