[Mesa-dev] [PATCH 19/21] glsl: set system values read directly in shader_info

Timothy Arceri timothy.arceri at collabora.com
Thu Oct 20 08:47:09 UTC 2016


---
 src/compiler/glsl/ir_set_program_inouts.cpp | 4 ++--
 src/compiler/shader_info.c                  | 1 -
 src/mesa/main/mtypes.h                      | 1 -
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/compiler/glsl/ir_set_program_inouts.cpp b/src/compiler/glsl/ir_set_program_inouts.cpp
index d8c4d70..ec589c7 100644
--- a/src/compiler/glsl/ir_set_program_inouts.cpp
+++ b/src/compiler/glsl/ir_set_program_inouts.cpp
@@ -124,7 +124,7 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len,
             prog->info.fs.uses_sample_qualifier |= var->data.sample;
          }
       } else if (var->data.mode == ir_var_system_value) {
-         prog->SystemValuesRead |= bitfield;
+         prog->info.system_values_read |= bitfield;
       } else {
          assert(var->data.mode == ir_var_shader_out);
          if (is_patch_generic) {
@@ -432,7 +432,7 @@ do_set_program_inouts(exec_list *instructions, struct gl_program *prog,
    prog->info.outputs_read = 0;
    prog->info.patch_inputs_read = 0;
    prog->info.patch_outputs_written = 0;
-   prog->SystemValuesRead = 0;
+   prog->info.system_values_read = 0;
    if (shader_stage == MESA_SHADER_FRAGMENT) {
       prog->info.fs.uses_sample_qualifier = false;
       prog->info.fs.uses_discard = false;
diff --git a/src/compiler/shader_info.c b/src/compiler/shader_info.c
index fcda73a..83e40cb 100644
--- a/src/compiler/shader_info.c
+++ b/src/compiler/shader_info.c
@@ -30,6 +30,5 @@ copy_shader_info(const struct gl_shader_program *shader_prog,
 {
    shader_info *info = &sh->Program->info;
 
-   info->system_values_read = sh->Program->SystemValuesRead;
    info->uses_texture_gather = sh->Program->UsesGather;
 }
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index d2d8c13..be8631b 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1923,7 +1923,6 @@ struct gl_program
    struct shader_info info;
 
    GLbitfield64 SecondaryOutputsWritten; /**< Subset of OutputsWritten outputs written with non-zero index. */
-   GLbitfield SystemValuesRead;   /**< Bitmask of SYSTEM_VALUE_x inputs used */
    GLbitfield TexturesUsed[MAX_COMBINED_TEXTURE_IMAGE_UNITS];  /**< TEXTURE_x_BIT bitmask */
    GLbitfield SamplersUsed;   /**< Bitfield of which samplers are used */
    GLbitfield ShadowSamplers; /**< Texture units used for shadow sampling. */
-- 
2.7.4



More information about the mesa-dev mailing list