glsl: set uses texture gather directly in shader_info
authorTimothy Arceri <timothy.arceri@collabora.com>
Thu, 20 Oct 2016 05:37:27 +0000 (16:37 +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 ec589c776d0f8b206668e6b329355c14aa674f05..90b06b9f41749b174a4e62ea4c2396c4ee3e8ed5 100644 (file)
@@ -416,7 +416,7 @@ ir_visitor_status
 ir_set_program_inouts_visitor::visit_enter(ir_texture *ir)
 {
    if (ir->op == ir_tg4)
-      prog->UsesGather = true;
+      prog->info.uses_texture_gather = true;
    return visit_continue;
 }
 
index 83e40cbedc8d43b0a0bd53669696af8614572217..1171bbf6773a87cba98b1f506cd703512a3eec0b 100644 (file)
@@ -29,6 +29,4 @@ copy_shader_info(const struct gl_shader_program *shader_prog,
                  struct gl_linked_shader *sh)
 {
    shader_info *info = &sh->Program->info;
-
-   info->uses_texture_gather = sh->Program->UsesGather;
 }
index fc216d011b9f04dad13628a7e3e4aa29ea3abea1..79cf9878dbd38bcc6f60a84d8bd3e8fe02eb4419 100644 (file)
@@ -1928,8 +1928,6 @@ struct gl_program
    GLbitfield ShadowSamplers; /**< Texture units used for shadow sampling. */
    GLbitfield ExternalSamplersUsed; /**< Texture units used for samplerExternalOES */
 
-   GLboolean UsesGather; /**< Does this program use gather4 at all? */
-
    /* Vertex and geometry shaders fields */
    unsigned ClipDistanceArraySize;
    unsigned CullDistanceArraySize;