radeonsi: stop using TGSI_PROPERTY_NEXT_SHADER
authorMarek Olšák <marek.olsak@amd.com>
Tue, 1 Sep 2020 21:48:44 +0000 (17:48 -0400)
committerVivek Pandya <vivekvpandya@gmail.com>
Mon, 7 Sep 2020 15:55:16 +0000 (21:25 +0530)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624>

src/gallium/drivers/radeonsi/si_shader.h
src/gallium/drivers/radeonsi/si_shader_nir.c
src/gallium/drivers/radeonsi/si_state_shaders.c

index 8694bc58ab71469aecf4980ca196de9412c5684d..eee16c5441c3a07c1a5ef9cd967174255631e545 100644 (file)
@@ -319,6 +319,8 @@ struct si_compiler_ctx_state {
 };
 
 struct si_shader_info {
+   shader_info base;
+
    gl_shader_stage stage;
 
    ubyte num_inputs;
index 02fd6dfd48b89677d0ca36c56c6695adc002b64f..a3dc554e5a9a3adf8803c16d91240172dd040bb5 100644 (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;
index fb6ab7e0ee22b51c84f733ce8d3a43c4f481c2d7..902b146be988c173d0afa2682de801cd4561ed25 100644 (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;