[Mesa-dev] [PATCH 18/21] st/mesa: use common system values read field

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


---
 src/mesa/program/prog_to_nir.c             | 1 -
 src/mesa/program/program.c                 | 4 ++--
 src/mesa/program/programopt.c              | 2 +-
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 ++--
 src/mesa/state_tracker/st_mesa_to_tgsi.c   | 2 +-
 5 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index 3c62456..08df05d 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -1051,7 +1051,6 @@ prog_to_nir(const struct gl_program *prog,
    s->info->num_abos = 0;
    s->info->num_ssbos = 0;
    s->info->num_images = 0;
-   s->info->system_values_read = prog->SystemValuesRead;
    s->info->uses_texture_gather = false;
    s->info->uses_clip_distance_out = false;
    s->info->separate_shader = false;
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index 4915a09..3b7745b 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -521,8 +521,8 @@ _mesa_get_min_invocations_per_fragment(struct gl_context *ctx,
       if (prog->info.fs.uses_sample_qualifier && !ignore_sample_qualifier)
          return MAX2(_mesa_geometric_samples(ctx->DrawBuffer), 1);
 
-      if (prog->SystemValuesRead & (SYSTEM_BIT_SAMPLE_ID |
-                                    SYSTEM_BIT_SAMPLE_POS))
+      if (prog->info.system_values_read & (SYSTEM_BIT_SAMPLE_ID |
+                                           SYSTEM_BIT_SAMPLE_POS))
          return MAX2(_mesa_geometric_samples(ctx->DrawBuffer), 1);
       else if (ctx->Multisample.SampleShading)
          return MAX2(ceil(ctx->Multisample.MinSampleShadingValue *
diff --git a/src/mesa/program/programopt.c b/src/mesa/program/programopt.c
index b4bbbda..1b50b5b 100644
--- a/src/mesa/program/programopt.c
+++ b/src/mesa/program/programopt.c
@@ -596,7 +596,7 @@ _mesa_program_fragment_position_to_sysval(struct gl_program *prog)
       return;
 
    prog->info.inputs_read &= ~BITFIELD64_BIT(VARYING_SLOT_POS);
-   prog->SystemValuesRead |= 1 << SYSTEM_VALUE_FRAG_COORD;
+   prog->info.system_values_read |= 1 << SYSTEM_VALUE_FRAG_COORD;
 
    for (i = 0; i < prog->NumInstructions; i++) {
       struct prog_instruction *inst = prog->Instructions + i;
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 253e49c..df9040e 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -6140,7 +6140,7 @@ st_translate_program(
    /* Declare misc input registers
     */
    {
-      GLbitfield sysInputs = proginfo->SystemValuesRead;
+      GLbitfield sysInputs = proginfo->info.system_values_read;
 
       for (i = 0; sysInputs; i++) {
          if (sysInputs & (1 << i)) {
@@ -6490,7 +6490,7 @@ get_mesa_program_tgsi(struct gl_context *ctx,
    /* This must be done before the uniform storage is associated. */
    if (shader->Stage == MESA_SHADER_FRAGMENT &&
        (prog->info.inputs_read & VARYING_BIT_POS ||
-        prog->SystemValuesRead & (1 << SYSTEM_VALUE_FRAG_COORD))) {
+        prog->info.system_values_read & (1 << SYSTEM_VALUE_FRAG_COORD))) {
       static const gl_state_index wposTransformState[STATE_LENGTH] = {
          STATE_INTERNAL, STATE_FB_WPOS_Y_TRANSFORM
       };
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 18948d6..9dc8f22 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -914,7 +914,7 @@ st_translate_mesa_program(
    /* Declare misc input registers
     */
    {
-      GLbitfield sysInputs = program->SystemValuesRead;
+      GLbitfield sysInputs = program->info.system_values_read;
 
       for (i = 0; sysInputs; i++) {
          if (sysInputs & (1 << i)) {
-- 
2.7.4



More information about the mesa-dev mailing list