mesa: Branch 'master' - 2 commits

Brian Paul brianp at kemper.freedesktop.org
Sat Mar 31 15:09:53 UTC 2007


 src/mesa/shader/slang/slang_codegen.c |    2 +-
 src/mesa/shader/slang/slang_emit.c    |    5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

New commits:
diff-tree 00831b5b3bb35bbe5ead2399229495b8ef945406 (from ec6c8f86f3fa0fa19d34dfa1ee1f9e4610e6e9d6)
Author: Brian <brian at yutani.localnet.net>
Date:   Sat Mar 31 09:09:48 2007 -0600

    always emit BGN/ENDSUB, for now anyway

diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index a316c47..088deaa 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -1796,14 +1796,11 @@ _slang_emit_code(slang_ir_node *n, slang
    emitInfo.EmitHighLevelInstructions = 0*ctx->Shader.EmitHighLevelInstructions;
    emitInfo.EmitCondCodes = ctx->Shader.EmitCondCodes;
    emitInfo.EmitComments = ctx->Shader.EmitComments;
-   emitInfo.EmitBeginEndSub = 0;  /* XXX for compiler debug only */
+   emitInfo.EmitBeginEndSub = GL_TRUE;
 
    if (!emitInfo.EmitCondCodes) {
       emitInfo.EmitHighLevelInstructions = GL_TRUE;
    }      
-   if (emitInfo.EmitComments) {
-      emitInfo.EmitBeginEndSub = GL_TRUE;
-   }
 
    (void) emit(&emitInfo, n);
 
diff-tree ec6c8f86f3fa0fa19d34dfa1ee1f9e4610e6e9d6 (from e608d92c5b42d192772066194531db8bfaff86ce)
Author: Brian <brian at yutani.localnet.net>
Date:   Sat Mar 31 09:09:21 2007 -0600

    fix scoping mistake in previous commit that checked for writable LHSs

diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index b1f6db8..0c14e64 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -2143,7 +2143,7 @@ _slang_gen_assignment(slang_assemble_ctx
    if (oper->children[0].type == SLANG_OPER_IDENTIFIER) {
       /* Check that var is writeable */
       slang_variable *var
-         = _slang_locate_variable(oper->locals,
+         = _slang_locate_variable(oper->children[0].locals,
                                   oper->children[0].a_id, GL_TRUE);
       if (!var) {
          slang_info_log_error(A->log, "undefined variable '%s'",



More information about the mesa-commit mailing list