radeonsi: stop using TGSI_PROPERTY_NEXT_SHADER

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624>
This commit is contained in:
Marek Olšák 2020-09-01 17:48:44 -04:00 committed by Marge Bot
parent 4c5f5d238b
commit 46bb051bc2
3 changed files with 8 additions and 6 deletions

View File

@ -319,6 +319,8 @@ struct si_compiler_ctx_state {
};
struct si_shader_info {
shader_info base;
gl_shader_stage stage;
ubyte num_inputs;

View File

@ -453,8 +453,8 @@ void si_nir_scan_shader(const struct nir_shader *nir, struct si_shader_info *inf
{
nir_function *func;
info->base = nir->info;
info->stage = nir->info.stage;
info->properties[TGSI_PROPERTY_NEXT_SHADER] = pipe_shader_type_from_mesa(nir->info.next_stage);
if (nir->info.stage == MESA_SHADER_VERTEX) {
info->properties[TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION] = nir->info.vs.window_space_position;

View File

@ -2333,16 +2333,16 @@ static int si_shader_select(struct pipe_context *ctx, struct si_shader_ctx_state
static void si_parse_next_shader_property(const struct si_shader_info *info, bool streamout,
struct si_shader_key *key)
{
unsigned next_shader = info->properties[TGSI_PROPERTY_NEXT_SHADER];
gl_shader_stage next_shader = info->base.next_stage;
switch (info->stage) {
case MESA_SHADER_VERTEX:
switch (next_shader) {
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
key->as_es = 1;
break;
case PIPE_SHADER_TESS_CTRL:
case PIPE_SHADER_TESS_EVAL:
case MESA_SHADER_TESS_CTRL:
case MESA_SHADER_TESS_EVAL:
key->as_ls = 1;
break;
default:
@ -2357,7 +2357,7 @@ static void si_parse_next_shader_property(const struct si_shader_info *info, boo
break;
case MESA_SHADER_TESS_EVAL:
if (next_shader == PIPE_SHADER_GEOMETRY || !info->writes_position)
if (next_shader == MESA_SHADER_GEOMETRY || !info->writes_position)
key->as_es = 1;
break;