Mesa (master): mesa: Upload boolean uniforms using UniformBooleanTrue.
Matt Turner
mattst88 at kemper.freedesktop.org
Tue Aug 19 01:34:29 UTC 2014
Module: Mesa
Branch: master
Commit: 6df0fd8fe9ccf5c927797897277343f068420a45
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6df0fd8fe9ccf5c927797897277343f068420a45
Author: Matt Turner <mattst88 at gmail.com>
Date: Fri Aug 8 11:58:16 2014 -0700
mesa: Upload boolean uniforms using UniformBooleanTrue.
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
---
src/mesa/main/uniform_query.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index 7e630e6..4cd2bca 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -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;
}
}
}
More information about the mesa-commit
mailing list