[Mesa-dev] [PATCH 46/53] glsl: tidy up PostDepthCoverage shader field

Timothy Arceri timothy.arceri at collabora.com
Tue Jan 3 02:43:50 UTC 2017


There is no reason for this to be in the shared gl_shader_info or
to copy it to gl_program at the end of linking (its already there).
---
 src/compiler/glsl/glsl_parser_extras.cpp | 2 +-
 src/compiler/glsl/linker.cpp             | 2 +-
 src/mesa/main/mtypes.h                   | 3 ++-
 src/mesa/main/shaderapi.c                | 1 -
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index b3358f9..75c0157 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -1816,7 +1816,7 @@ set_shader_inout_layout(struct gl_shader *shader,
          state->ARB_fragment_coord_conventions_enable;
       shader->EarlyFragmentTests = state->fs_early_fragment_tests;
       shader->info.InnerCoverage = state->fs_inner_coverage;
-      shader->info.PostDepthCoverage = state->fs_post_depth_coverage;
+      shader->PostDepthCoverage = state->fs_post_depth_coverage;
       shader->BlendSupport = state->fs_blend_support;
       break;
 
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 029a47f..2114876 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -1880,7 +1880,7 @@ link_fs_inout_layout_qualifiers(struct gl_shader_program *prog,
       linked_shader->info.InnerCoverage |=
          shader->info.InnerCoverage;
       linked_shader->Program->info.fs.post_depth_coverage |=
-         shader->info.PostDepthCoverage;
+         shader->PostDepthCoverage;
 
       linked_shader->Program->sh.fs.BlendSupport |= shader->BlendSupport;
    }
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 5311354..3a8cfdf 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2238,7 +2238,6 @@ struct gl_subroutine_function
  */
 struct gl_shader_info
 {
-   bool PostDepthCoverage;
    bool InnerCoverage;
 
    struct {
@@ -2428,6 +2427,8 @@ struct gl_shader
    bool redeclares_gl_fragcoord;
    bool uses_gl_fragcoord;
 
+   bool PostDepthCoverage;
+
    /**
     * Fragment shader state from GLSL 1.50 layout qualifiers.
     */
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 48b271c..97742fe 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -2208,7 +2208,6 @@ _mesa_copy_linked_program_data(const struct gl_shader_program *src,
    case MESA_SHADER_FRAGMENT: {
       dst->info.fs.depth_layout = src->FragDepthLayout;
       dst->info.fs.inner_coverage = dst_sh->info.InnerCoverage;
-      dst->info.fs.post_depth_coverage = dst_sh->info.PostDepthCoverage;
       break;
    }
    case MESA_SHADER_COMPUTE: {
-- 
2.9.3



More information about the mesa-dev mailing list