[Mesa-dev] [PATCH 2/2 v2] mesa/st: Silence unused variable warning
Gurkirpal Singh
gurkirpal204 at gmail.com
Tue Jun 28 22:14:51 UTC 2016
v2: Use MAYBE_UNUSED
Changed commit tag
(Suggested by Ian Romanick)
Signed-off-by: Gurkirpal Singh <gurkirpal204 at gmail.com>
---
src/mesa/state_tracker/st_glsl_to_nir.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index a880564..2cdb7b6 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -46,6 +46,8 @@
#include "compiler/glsl/glsl_to_nir.h"
#include "compiler/glsl/ir.h"
+#include "util/macros.h"
+
/* Depending on PIPE_CAP_TGSI_TEXCOORD (st->needs_texcoord_semantic) we
* may need to fix up varying slots so the glsl->nir path is aligned
@@ -169,7 +171,7 @@ st_nir_assign_uniform_locations(struct gl_program *prog,
if (uniform->type->is_sampler()) {
unsigned val;
- bool found = shader_program->UniformHash->get(val, uniform->name);
+ MAYBE_UNUSED bool found = shader_program->UniformHash->get(val, uniform->name);
loc = shaderidx++;
assert(found);
/* this ensure that nir_lower_samplers looks at the correct
--
2.7.4
More information about the mesa-dev
mailing list