Mesa (glsl-pp-rework-2): glsl/sl: fix _parse_boolconstant()

Brian Paul brianp at kemper.freedesktop.org
Thu Dec 10 08:18:36 PST 2009


Module: Mesa
Branch: glsl-pp-rework-2
Commit: 289eab5389c0f0f3f85f872b2ba440f5e8416a50
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=289eab5389c0f0f3f85f872b2ba440f5e8416a50

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Dec 10 09:16:20 2009 -0700

glsl/sl: fix _parse_boolconstant()

Need to emit the radix before the digits.
This fixes several glean/glgl1 regressions.

---

 src/glsl/cl/sl_cl_parse.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/glsl/cl/sl_cl_parse.c b/src/glsl/cl/sl_cl_parse.c
index 81e30a8..a9db65c 100644
--- a/src/glsl/cl/sl_cl_parse.c
+++ b/src/glsl/cl/sl_cl_parse.c
@@ -1821,6 +1821,7 @@ _parse_boolconstant(struct parse_context *ctx,
 {
    if (_parse_id(ctx, ctx->dict._false, ps) == 0) {
       _emit(ctx, &ps->out, OP_PUSH_BOOL);
+      _emit(ctx, &ps->out, 2);  /* radix */
       _emit(ctx, &ps->out, '0');
       _emit(ctx, &ps->out, '\0');
       return 0;
@@ -1828,6 +1829,7 @@ _parse_boolconstant(struct parse_context *ctx,
 
    if (_parse_id(ctx, ctx->dict._true, ps) == 0) {
       _emit(ctx, &ps->out, OP_PUSH_BOOL);
+      _emit(ctx, &ps->out, 2);  /* radix */
       _emit(ctx, &ps->out, '1');
       _emit(ctx, &ps->out, '\0');
       return 0;



More information about the mesa-commit mailing list