mesa: Upload boolean uniforms using UniformBooleanTrue.
authorMatt Turner <mattst88@gmail.com>
Fri, 8 Aug 2014 18:58:16 +0000 (11:58 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 19 Aug 2014 01:35:47 +0000 (18:35 -0700)
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/uniform_query.cpp

index 7e630e65bf90c1f760f0b27038abb27b25b9d808..4cd2bca01e373b976e63af9d192635548f97e9b7 100644 (file)
@@ -799,9 +799,9 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg,
 
       for (i = 0; i < elems; i++) {
         if (basicType == GLSL_TYPE_FLOAT) {
-           dst[i].i = src[i].f != 0.0f ? 1 : 0;
+            dst[i].i = src[i].f != 0.0f ? ctx->Const.UniformBooleanTrue : 0;
         } else {
-           dst[i].i = src[i].i != 0    ? 1 : 0;
+            dst[i].i = src[i].i != 0    ? ctx->Const.UniformBooleanTrue : 0;
         }
       }
    }