From: Marek Olšák Date: Tue, 1 Sep 2020 21:48:44 +0000 (-0400) Subject: radeonsi: stop using TGSI_PROPERTY_NEXT_SHADER X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc66537f2ea56aeb7baa468887ee82868036469a;p=mesa.git radeonsi: stop using TGSI_PROPERTY_NEXT_SHADER Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 8694bc58ab7..eee16c5441c 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -319,6 +319,8 @@ struct si_compiler_ctx_state { }; struct si_shader_info { + shader_info base; + gl_shader_stage stage; ubyte num_inputs; diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 02fd6dfd48b..a3dc554e5a9 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -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; diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index fb6ab7e0ee2..902b146be98 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -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;