glsl: tidy up PostDepthCoverage shader field
authorTimothy Arceri <timothy.arceri@collabora.com>
Mon, 19 Dec 2016 22:39:00 +0000 (09:39 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 19 Jan 2017 06:05:26 +0000 (17:05 +1100)
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).

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 70bde069e7abdbf63c990521f24b140cf530e427..063ca45b307602d6d119ff51d8b0f3ffb9bddef0 100644 (file)
@@ -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;
 
index 5f96a7e7447d008fc50ca16d734519ed0fa48c33..2bb080a34ac273c30a65e39d78dcbeaf41620e3a 100644 (file)
@@ -1881,7 +1881,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;
    }
index 7b8be09d77825863111369a8bee829b37efe3855..d0e721e0e9d91c2f479e9f0c7a9210aa27f55e28 100644 (file)
@@ -2242,7 +2242,6 @@ struct gl_subroutine_function
  */
 struct gl_shader_info
 {
-   bool PostDepthCoverage;
    bool InnerCoverage;
 
    struct {
@@ -2430,6 +2429,8 @@ struct gl_shader
    bool redeclares_gl_fragcoord;
    bool uses_gl_fragcoord;
 
+   bool PostDepthCoverage;
+
    /**
     * Fragment shader state from GLSL 1.50 layout qualifiers.
     */
index 80cac37e8ecf1ad99898896c44ca7641a6b05b91..2a7f0a2c82898183de543f4f76aa901b8dfe7df6 100644 (file)
@@ -2233,7 +2233,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: {