glsl: set InnerCoverage directly in gl_program
authorTimothy Arceri <timothy.arceri@collabora.com>
Mon, 19 Dec 2016 22:44:20 +0000 (09:44 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 19 Jan 2017 06:05:26 +0000 (17:05 +1100)
Also move out of the shared gl_shader_info.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/glsl/linker.cpp
src/mesa/main/mtypes.h
src/mesa/main/shaderapi.c

index 063ca45b307602d6d119ff51d8b0f3ffb9bddef0..a6b695c1a44d48d5bedb243a0f086b7c76a29cb2 100644 (file)
@@ -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;
index 2bb080a34ac273c30a65e39d78dcbeaf41620e3a..35f1d8b6a8e8d78db97cc2985bf8d2f85ef72f24 100644 (file)
@@ -1878,8 +1878,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;
 
index d0e721e0e9d91c2f479e9f0c7a9210aa27f55e28..d036958f9d00c6ccf0d18ae00af809d0aef9c053 100644 (file)
@@ -2242,8 +2242,6 @@ struct gl_subroutine_function
  */
 struct gl_shader_info
 {
-   bool InnerCoverage;
-
    struct {
       /** Global xfb_stride out qualifier if any */
       GLuint BufferStride[MAX_FEEDBACK_BUFFERS];
@@ -2430,6 +2428,7 @@ struct gl_shader
    bool uses_gl_fragcoord;
 
    bool PostDepthCoverage;
+   bool InnerCoverage;
 
    /**
     * Fragment shader state from GLSL 1.50 layout qualifiers.
index 2a7f0a2c82898183de543f4f76aa901b8dfe7df6..c87ba0946ca2764594019c839ec9f198dc615348 100644 (file)
@@ -2232,7 +2232,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: {