[Mesa-dev] [PATCH 04/14] mesa/glsl: move ARB_fragment_coord_conventions_enable field

Timothy Arceri timothy.arceri at collabora.com
Tue Nov 22 23:22:39 UTC 2016


This is only used by gl_shader not gl_linked_shader so move it
there.
---
 src/compiler/glsl/glsl_parser_extras.cpp | 2 +-
 src/compiler/glsl/linker.cpp             | 2 +-
 src/mesa/main/mtypes.h                   | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 0efcfe9..ad13436 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -1809,7 +1809,7 @@ set_shader_inout_layout(struct gl_shader *shader,
       shader->info.uses_gl_fragcoord = state->fs_uses_gl_fragcoord;
       shader->info.pixel_center_integer = state->fs_pixel_center_integer;
       shader->info.origin_upper_left = state->fs_origin_upper_left;
-      shader->info.ARB_fragment_coord_conventions_enable =
+      shader->ARB_fragment_coord_conventions_enable =
          state->ARB_fragment_coord_conventions_enable;
       shader->EarlyFragmentTests = state->fs_early_fragment_tests;
       shader->BlendSupport = state->fs_blend_support;
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index a98ffc0..fe90afc 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -4787,7 +4787,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
          goto done;
       }
 
-      if (prog->Shaders[i]->info.ARB_fragment_coord_conventions_enable) {
+      if (prog->Shaders[i]->ARB_fragment_coord_conventions_enable) {
          prog->ARB_fragment_coord_conventions_enable = true;
       }
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index a149d0a..c4fdbf3 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2236,7 +2236,6 @@ struct gl_shader_info
 {
    bool uses_gl_fragcoord;
    bool redeclares_gl_fragcoord;
-   bool ARB_fragment_coord_conventions_enable;
 
    /**
     * Fragment shader state from GLSL 1.50 layout qualifiers.
@@ -2420,6 +2419,8 @@ struct gl_shader
     */
    bool EarlyFragmentTests;
 
+   bool ARB_fragment_coord_conventions_enable;
+
    struct gl_shader_info info;
 };
 
-- 
2.7.4



More information about the mesa-dev mailing list