summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2020-09-01 17:48:44 -0400
committerMarge Bot <eric+marge@anholt.net>2020-09-07 11:15:40 +0000
commit46bb051bc2a911d8177521b59cd1f81330be123a (patch)
treeaada56ccb6a55b44f7b82a39ec9502563d62aedf
parent4c5f5d238b953baab5a3017f76c0b0cb322fea9a (diff)
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>
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.h2
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c10
3 files changed, 8 insertions, 6 deletions
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;