[Mesa-dev] [PATCH 64/70] glsl: set InnerCoverage directly in gl_program

Timothy Arceri timothy.arceri at collabora.com
Tue Dec 20 10:38:14 UTC 2016


Also move out of the shared gl_shader_info.
---
 src/compiler/glsl/glsl_parser_extras.cpp | 2 +-
 src/compiler/glsl/linker.cpp             | 3 +--
 src/mesa/main/mtypes.h                   | 3 +--
 src/mesa/main/shaderapi.c                | 1 -
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 75c0157..ab073a2 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -1815,7 +1815,7 @@ set_shader_inout_layout(struct gl_shader *shader,
       shader->ARB_fragment_coord_conventions_enable =
          state->ARB_fragment_coord_conventions_enable;
       shader->EarlyFragmentTests = state->fs_early_fragment_tests;
-      shader->info.InnerCoverage = state->fs_inner_coverage;
+      shader->InnerCoverage = state->fs_inner_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 e0e08f1..ca62fb5 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -1877,8 +1877,7 @@ link_fs_inout_layout_qualifiers(struct gl_shader_program *prog,
 
       linked_shader->Program->info.fs.early_fragment_tests |=
          shader->EarlyFragmentTests;
-      linked_shader->info.InnerCoverage |=
-         shader->info.InnerCoverage;
+      linked_shader->Program->info.fs.inner_coverage |= shader->InnerCoverage;
       linked_shader->Program->info.fs.post_depth_coverage |=
          shader->PostDepthCoverage;
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index c3050ee..bc69b6f 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2234,8 +2234,6 @@ struct gl_subroutine_function
  */
 struct gl_shader_info
 {
-   bool InnerCoverage;
-
    struct {
       /** Global xfb_stride out qualifier if any */
       GLuint BufferStride[MAX_FEEDBACK_BUFFERS];
@@ -2424,6 +2422,7 @@ struct gl_shader
    bool uses_gl_fragcoord;
 
    bool PostDepthCoverage;
+   bool InnerCoverage;
 
    /**
     * Fragment shader state from GLSL 1.50 layout qualifiers.
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index c0dbd28..0f44c53 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -2207,7 +2207,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;
       break;
    }
    case MESA_SHADER_COMPUTE: {
-- 
2.9.3



More information about the mesa-dev mailing list