On 04/06/2016 04:46 PM, Nicolai Hähnle wrote:
From: Nicolai Hähnle <nicolai.haeh...@amd.com>

It is used as a bitfield, so it seems cleaner to keep it unsigned.
---
  src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp 
b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index cd481c1..e658168 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -389,7 +389,7 @@ public:
     unsigned num_output_arrays;

     int num_address_regs;
-   int samplers_used;
+   uint32_t samplers_used;
     glsl_base_type sampler_types[PIPE_MAX_SAMPLERS];
     int sampler_targets[PIPE_MAX_SAMPLERS];   /**< One of TGSI_TEXTURE_* */
     int buffers_used;


If/when the day comes that we have more than 32 samplers, it might be good to have an assertion something like:

assert(sizeof(foo->samplers_used) * 8 <= PIPE_MAX_SAMPLERS);

In any case, for patches 1-4:
Reviewed-by: Brian Paul <bri...@vmware.com>

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to