summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2019-03-21 19:19:05 -0600
committerBrian Paul <brianp@vmware.com>2019-03-25 06:51:31 -0600
commitd13167cd2177849a65fadc2d08a2d3adf7c76e65 (patch)
treed70b85441675818b6d4e81849a44e7429ac78943
parente1d80571606684af869317837902abc6f6e82017 (diff)
nir: fix a few signed/unsigned comparison warnings
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
-rw-r--r--src/compiler/nir_types.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index aff575c60b0b..3bf93c58b228 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -690,7 +690,7 @@ glsl_type_get_sampler_count(const struct glsl_type *type)
if (glsl_type_is_struct_or_ifc(type)) {
unsigned count = 0;
- for (int i = 0; i < glsl_get_length(type); i++)
+ for (unsigned i = 0; i < glsl_get_length(type); i++)
count += glsl_type_get_sampler_count(glsl_get_struct_field(type, i));
return count;
}
@@ -711,7 +711,7 @@ glsl_type_get_image_count(const struct glsl_type *type)
if (glsl_type_is_struct_or_ifc(type)) {
unsigned count = 0;
- for (int i = 0; i < glsl_get_length(type); i++)
+ for (unsigned i = 0; i < glsl_get_length(type); i++)
count += glsl_type_get_image_count(glsl_get_struct_field(type, i));
return count;
}