Mesa (shader-work): 26 new commits

Luca Barbieri lb at kemper.freedesktop.org
Tue Sep 14 15:59:06 UTC 2010


URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8481d8366604f949cf5c33c8ccc34d90d46f9a0
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Tue Sep 14 04:56:34 2010 +0200

    glsl/loop_unroll: unroll loops with cond breaks anywhere, not just the end
    
    Currently we only unroll loops with conditional breaks at the end, which is
    the form that ir_lower_jumps generates.
    
    However, if breaks are not lowered, they tend to appear at the beginning, so
    add support for a conditional break anywhere.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=20c87414bc919b6783b231bf8b7373c62a0a368e
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Tue Sep 7 19:29:00 2010 +0200

    glsl: teach loop analysis that array dereferences are bounds on the index (v3)
    
    Changes in v3:
    - Only look for array dereferences in code that always executes, to avoid
      miscompilation
    
    Changes in v2:
    - Incorporate Ian Romanick's feedback
    - Make GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB disable this
    
    Since out-of-bounds dereferences cause undefined behavior, we are allowed
    to assume that they terminate the loop, if my interpretation of the GLSL
    spec is correct.
    
    This allows to find the maximum number of iterations in cases like this:
    
    uniform int texcoords;
    float4 gl_TexCoord[8];
    
    for(i = 0; i < texcoords; ++i)
    	do_something_with(gl_TexCoord[i]);
    
    This is apparently an interesting case since NV_fragment_program2 has
    a construct for this.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a9c0986987b200d483defed8ca08d262d09c26ab
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Wed Sep 8 06:24:10 2010 +0200

    mesa: add MESA_ROBUST_ACCESS env var to enable ARB_robustness
    
    We use the robust access bit to choose whether to apply some loop
    optimizations in the GLSL compiler, so it's a good idea to be able
    to test this, and it's useful in general to be able to force robustness
    from the command line.
    
    In the future, GLX_ARB_create_context_robustness will also allow to turn
    this on programmatically in the standard way.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=11f5a8dbe753dacfa371002d272ea842998a2b16
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Tue Sep 14 04:15:25 2010 +0200

    glsl/loop_analysis: fix miscompilation with continues before cond breaks
    
    In the following case, we currently incorrectly determine that the loop
    has at most 8 iterations, while it is in fact an infinite loop.
    
    for(;; ++i)
    {
    	foo();
    
    	if(i >= 4) continue;
    
    	if(i < 8) break;
    }
    
    To fix this, stop looking for induction variable terminators if we hit
    a continue, or a continue nested inside ifs.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=759b5db9168f7c0ecc55d259b518f8c32be946fb
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Thu Sep 9 20:15:09 2010 +0200

    glsl: TEMP: do array indexing lowering and structure split in main.cpp
    
    The places that run optimization passes should be unified and refactored,
    so that things need not be added everywhere.
    
    Currently add this to main.cpp; OpenGL will need this too depending on
    options.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=21d589669cd6fa70e5fcc257bd0ea9e07eb467aa
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Wed Sep 8 03:47:58 2010 +0200

    glsl: teach structure splitting to split arrays, and never split in/outs
    
    Currently structure splitting cannot split arrays, which makes
    do_array_index_to_cond_assign useless.
    
    This commit adds that capability.
    
    Also, it prevents it from splitting in/out/inout variables, which were
    incorrectly split.
    
    It may be possible to split them if user-defined, but that will need
    further changes and some way to make sure we link stages correctly.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0fbcf79cced4bc0c50477024520e5de477185bb1
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Wed Sep 8 01:35:44 2010 +0200

    glsl: add pass to lower variable array indexing to conditional assignments
    
    Currenly GLSL happily generates indirect addressing of any kind of
    arrays.
    
    Unfortunately DirectX 9 GPUs are not guaranteed to support any of them in
    general.
    
    This pass fixes that by lowering such constructs to a binary search on the
    values, followed at the end by vectorized generation of equality masks, and
    4 conditional assignments for each mask generation.
    
    Note that this requires the ir_binop_equal change so that we can emit SEQ
    to generate the boolean masks.
    
    Unfortunately, ir_structure_splitting is too dumb to turn the resulting
    constant array references to individual variables, so this will need to
    be added too before this pass can actually be effective for temps.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=79ab394cd2ca3f88ad854503b95e886a6c5d47d5
Author: Brian Paul <brianp at vmware.com>
Date:   Tue Sep 14 09:40:23 2010 -0600

    mesa: upgrade wglext.h to version 22

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b106e6261a088c6ab97f774508940c2aa935204e
Author: Brian Paul <brianp at vmware.com>
Date:   Tue Sep 14 09:39:44 2010 -0600

    mesa: upgrade glxext.h to version 32

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7993832c12bba578010005b344dcd3817be84a42
Author: Brian Paul <brianp at vmware.com>
Date:   Tue Sep 14 09:37:35 2010 -0600

    mesa: update to version 64 of GL/glext.h
    
    A number of other files had to be updated as well because const
    qualifiers were added to the glMultiDrawArrays() function.
    Also, GL_FIXED is now defined in glext.h.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=83f5f50f2f69adae497c71ac48e4e0177979ebff
Author: Brian Paul <brianp at vmware.com>
Date:   Tue Sep 14 09:16:40 2010 -0600

    mesa: move, redefine MESA_GEOMETRY_PROGRAM

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1c0644e9dac946131594216e23953a9c85335282
Author: Brian Paul <brianp at vmware.com>
Date:   Tue Sep 14 09:15:19 2010 -0600

    glsl2: add case for ir_unop_noise
    
    Silences a compiler warning.  Still need to add some assertions
    for this case.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b04ead569fbfa48ea01d2f25b20f1f8a8b8dee1
Author: Brian Paul <brianp at vmware.com>
Date:   Tue Sep 14 09:05:46 2010 -0600

    glsl2: fix comments

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9476efe77ff196993937c3aa2e5bca725ceb0b41
Author: Chia-I Wu <olv at lunarg.com>
Date:   Mon Sep 13 13:20:25 2010 +0800

    mesa: Remove unnecessary FEATURE tests.
    
    Remove all FEATURE tests in mesa/drivers/common/.  They are not needed
    and the code looks better without them.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=10ff2646a443ca3c54d66443b346eb7063973b5e
Author: Chia-I Wu <olv at lunarg.com>
Date:   Mon Sep 13 13:35:12 2010 +0800

    mesa: Less FEATURE_ARB_sync tests.
    
    Add dummy static inline definitions to syncobj.h when FEATURE_ARB_sync
    is 0, and remove most FEATURE_ARB_sync tests.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=db6273e0ddc5dbfcff27b8f75982bbf348810d31
Author: Chia-I Wu <olv at lunarg.com>
Date:   Mon Sep 13 13:51:52 2010 +0800

    mesa: Remove unused _MESA_INIT_*_FUNCTIONS.
    
    They were intended to be used to build OpenGL ES only DRI drivers, but
    that never happened.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1c6992b873df6de36f7b8d203fc9d993fcebab9d
Author: Vinson Lee <vlee at vmware.com>
Date:   Tue Sep 14 00:42:20 2010 -0700

    gallivm: Remove unnecessary header.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=aeb83928fdc09d9310df0f94aaddf87d9635dc7e
Author: Vinson Lee <vlee at vmware.com>
Date:   Tue Sep 14 00:17:13 2010 -0700

    llvmpipe: Initialize variable for potentially unhandled switch case.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=45ee8463a2a771c68b8146c87fa582a004dfde5e
Author: Vinson Lee <vlee at vmware.com>
Date:   Tue Sep 14 00:08:45 2010 -0700

    i965g: Fix 'control reaches end of non-void function' warning.
    
    Fixes the following GCC warning.
    brw_screen.c: In function 'brw_get_shader_param':
    brw_screen.c:241: warning: control reaches end of non-void function

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=706380cf7da3d376b22bc32cb5decfb66665053d
Author: Vinson Lee <vlee at vmware.com>
Date:   Mon Sep 13 23:58:42 2010 -0700

    i915g: Fix 'control reaches end of non-void function' warning.
    
    Fixes the following GCC warning.
    i915_screen.c: In function 'i915_get_shader_param':
    i915_screen.c:184: warning: control reaches end of non-void function

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d4d48c0579f7eb8d889ad325e8f1c9b4a95f6ed7
Author: Vinson Lee <vlee at vmware.com>
Date:   Mon Sep 13 23:42:35 2010 -0700

    i915: Fix "implicit declaration of function 'draw_get_shader_param'" warning.
    
    Fixes the following GCC warning.
    i915_screen.c: In function 'i915_get_shader_param':
    i915_screen.c:147: warning: implicit declaration of function 'draw_get_shader_param'

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c5867acb0d32124999f236c600480100dd7377fc
Author: Vinson Lee <vlee at vmware.com>
Date:   Mon Sep 13 23:23:34 2010 -0700

    identity: Fix 'assignment from incompatible pointer type' warning.
    
    This is a follow-up to commit a508d2dddcc67d0f92cc36b9ed6f36a9bbfc579d.
    
    Fixes the following GCC warning.
    id_screen.c: In function 'identity_screen_create':
    id_screen.c:317: warning: assignment from incompatible pointer type

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4f2f02b7d6b0e687cc5d775d00662c309cc20da7
Author: Vinson Lee <vlee at vmware.com>
Date:   Mon Sep 13 23:02:37 2010 -0700

    rbug: Fix 'assignment from incompatible pointer type' warning.
    
    This is a follow-up to commit a508d2dddcc67d0f92cc36b9ed6f36a9bbfc579d.
    
    Fixes the following GCC warning.
    rbug_screen.c: In function 'rbug_screen_create':
    rbug_screen.c:331: warning: assignment from incompatible pointer type

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fbc7c9b7a9d9df979ea82136d2b74121e5d4346e
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Tue Sep 14 05:10:59 2010 +0200

    mesa/st: ask GLSL to not emit noise since we have a dummy implementation
    
    Note, BTW, that the Gallium implementation returns 0.5, which seems
    to violate the GLSL spec, where it should return 0.0 instead.
    
    Not sure whether changing it to 0 is correct or not.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b37459388b22fb6a831d45bc08e51cdb7b9c610c
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Mon Sep 6 02:31:20 2010 +0200

    mesa/st: set compiler options based on Gallium shader caps
    
    This turns on if conversion and unlimited loop unrolling if control
    flow is not supported.
    
    NOTE: this will change the behavior of r300g and any other driver
    that doesn't advertise control flow

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a508d2dddcc67d0f92cc36b9ed6f36a9bbfc579d
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Sep 5 20:50:50 2010 +0200

    gallium: introduce get_shader_param (ALL DRIVERS CHANGED) (v3)
    
    Changes in v3:
    - Also change trace, which I forgot about
    
    Changes in v2:
    - No longer adds tessellation shaders
    
    Currently each shader cap has FS and VS versions.
    
    However, we want a version of them for geometry, tessellation control,
    and tessellation evaluation shaders, and want to be able to easily
    query a given cap type for a given shader stage.
    
    Since having 5 duplicates of each shader cap is unmanageable, add
    a new get_shader_param function that takes both a shader cap from a
    new enum and a shader stage.
    
    Drivers with non-unified shaders will first switch on the shader
    and, within each case, switch on the cap.
    
    Drivers with unified shaders instead first check whether the shader
    is supported, and then switch on the cap.
    
    MAX_CONST_BUFFERS is now per-stage.
    The geometry shader cap is removed in favor of checking whether the
    limit of geometry shader instructions is greater than 0, which is also
    used for tessellation shaders.
    
    WARNING: all drivers changed and compiled but only nvfx tested




More information about the mesa-commit mailing list