mesa: Changes to 'gallium-0.1'

Brian Paul brianp at kemper.freedesktop.org
Tue Jul 1 10:49:15 PDT 2008


The branch, gallium-0.1 has been updated
        Commits at: http://cgit.freedesktop.org/mesa/mesa/log/?h=gallium-0.1

Summary of changes:
 src/mesa/shader/slang/slang_codegen.c |  128 +++++++++++++++++++++++++++------
 src/mesa/shader/slang/slang_ir.c      |    8 ++-
 2 files changed, 110 insertions(+), 26 deletions(-)

       via  44c99ad23655204fd2e567fc38512f12e5f262af (commit)
       via  7d4f01413f16c15b55e99aba6da18b5c979c880c (commit)
      from  e99ce4af8a6a6f9b257bfceb0f9133a29f06f2c7 (commit)


- Commits -----------------------------------------------
commit 44c99ad23655204fd2e567fc38512f12e5f262af
Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Tue Jul 1 11:48:57 2008 -0600

    mesa: better function inlining in the presence of 'return' statements
    
    Before, the presence of a 'return' statement always prevented inlining
    a function.  This was because we didn't want to accidentally return from
    the _calling_ function.  We still need the semantic of 'return' when inlining
    but we can't always use unconditional branches/jumps (GPUs don't always
    support arbitrary branching).
    
    Now, we allow inlining functions w/ return if the return is the last
    statement in the function.  This fixes the common case of a function
    that returns a value, such as:
    
    vec4 square(const in vec4 x)
    {
       return x * x;
    }
    
    which effectively compiles into:
    
    vec4 square(const in vec4 x)
    {
       __retVal = x * x;
       return;
    }
    
    The 'return' can be no-op'd now and we can inline the function.
    
    cherry-picked from master

commit 7d4f01413f16c15b55e99aba6da18b5c979c880c
Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Tue Jul 1 11:48:27 2008 -0600

    mesa: add/fix some IrInfo entries for debugging purposes
    
    cherry-picked from master

---------------------------------



More information about the mesa-commit mailing list