From 4807a83da0e0f5e3272e85504ee3b2213ef1910a Mon Sep 17 00:00:00 2001
From: Timothy Arceri <timothy.arceri@collabora.com>
Date: Fri, 4 Nov 2016 11:40:10 +1100
Subject: mesa/glsl: set num_textures per stage directly in shader_info

Reviewed-by: Eric Anholt <eric@anholt.net>
---
 src/mesa/main/mtypes.h          | 1 -
 src/mesa/main/uniform_query.cpp | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

(limited to 'src/mesa/main')

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index ffd21ecea3b..69241beadd1 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2356,7 +2356,6 @@ struct gl_linked_shader
     * \note Each of these fields is only set post-linking.
     */
    /*@{*/
-   unsigned num_samplers;	/**< Number of samplers used by this shader. */
    GLbitfield active_samplers;	/**< Bitfield of which samplers are used */
    GLbitfield shadow_samplers;	/**< Samplers used for shadow sampling. */
    /*@}*/
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index ec6d2774844..73e7b0bfdfd 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -1141,7 +1141,7 @@ _mesa_sampler_uniforms_pipeline_are_valid(struct gl_pipeline_object *pipeline)
          TexturesUsed[unit] |= (1 << tgt);
       }
 
-      active_samplers += shader->num_samplers;
+      active_samplers += shader->Program->info.num_textures;
    }
 
    if (active_samplers > MAX_COMBINED_TEXTURE_IMAGE_UNITS) {
-- 
cgit v1.2.3