glsl: set patch inputs read directly in shader_info
authorTimothy Arceri <timothy.arceri@collabora.com>
Thu, 20 Oct 2016 05:21:24 +0000 (16:21 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Wed, 26 Oct 2016 03:29:36 +0000 (14:29 +1100)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/glsl/ir_set_program_inouts.cpp
src/compiler/shader_info.c
src/mesa/main/mtypes.h

index 7cd5d0ca0c6a5f458f13bf7ffa81a956507a5144..91fa0fcb049bfb018f43d2fc24c6297afad2ff40 100644 (file)
@@ -111,7 +111,7 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len,
 
       if (var->data.mode == ir_var_shader_in) {
          if (is_patch_generic)
-            prog->PatchInputsRead |= bitfield;
+            prog->info.patch_inputs_read |= bitfield;
          else
             prog->info.inputs_read |= bitfield;
 
@@ -430,7 +430,7 @@ do_set_program_inouts(exec_list *instructions, struct gl_program *prog,
    prog->info.outputs_written = 0;
    prog->SecondaryOutputsWritten = 0;
    prog->info.outputs_read = 0;
-   prog->PatchInputsRead = 0;
+   prog->info.patch_inputs_read = 0;
    prog->PatchOutputsWritten = 0;
    prog->SystemValuesRead = 0;
    if (shader_stage == MESA_SHADER_FRAGMENT) {
index af8b6c2a1c7b030d728dae1d70f24ad7c7b45568..d33a271dae41e7abc63116893c2e05581a3b8bce 100644 (file)
@@ -30,7 +30,6 @@ copy_shader_info(const struct gl_shader_program *shader_prog,
 {
    shader_info *info = &sh->Program->info;
 
-   info->patch_inputs_read = sh->Program->PatchInputsRead;
    info->patch_outputs_written = sh->Program->PatchOutputsWritten;
    info->system_values_read = sh->Program->SystemValuesRead;
    info->uses_texture_gather = sh->Program->UsesGather;
index 468d7544a9a885e0c17de83d0d55b2c7fd603465..0469da5f1742eac022cc7a05e3d23b41b07d4bf5 100644 (file)
@@ -1923,7 +1923,6 @@ struct gl_program
    struct shader_info info;
 
    GLbitfield64 SecondaryOutputsWritten; /**< Subset of OutputsWritten outputs written with non-zero index. */
-   GLbitfield PatchInputsRead;  /**< VAR[0..31] usage for patch inputs (user-defined only) */
    GLbitfield PatchOutputsWritten; /**< VAR[0..31] usage for patch outputs (user-defined only) */
    GLbitfield SystemValuesRead;   /**< Bitmask of SYSTEM_VALUE_x inputs used */
    GLbitfield TexturesUsed[MAX_COMBINED_TEXTURE_IMAGE_UNITS];  /**< TEXTURE_x_BIT bitmask */