Mesa (master): 21 new commits

Kenneth Graunke kwg at kemper.freedesktop.org
Fri Nov 11 06:51:35 UTC 2011


URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9ae10e9cbdfce6404a3d86188f2897d8f5d0dcb2
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Nov 9 21:32:17 2011 -0800

    i965: Make Gen6+ renderbuffer surface updates not depend on NEW_COLOR.
    
    NEW_COLOR is only needed on Gen4-5 as brw_update_renderbuffer_surfaces
    only uses ctx->Color when intel->gen < 6.
    
    This should reduce unnecessary state updates.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d46dfed9585e7e8a26993e7f67faffe8e2641939
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Nov 9 21:29:54 2011 -0800

    i965: Reorder state atom lists so all the surface state is together.
    
    Not strictly necessary, but seems like a good idea.
    
    Suggested-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a17a78a212be10fe3a9a330f3861d771e92d9074
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Nov 9 00:58:21 2011 -0800

    glsl: Handle constant expressions involving ir_binop_equal/nequal.
    
    Constant expressions which called GLSL's equal() and notEqual()
    built-ins on bvecs would hit an assertion failure; we simply forgot to
    implement them for booleans.
    
    NOTE: This is a candidate for stable release branches.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=83d0514f1fc5f747a4bf4c900338a47a17f86e4a
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Nov 9 21:57:12 2011 -0800

    glsl: Remove textureGradOffset built-ins taking samplerCube parameters.
    
    These simply don't exist in the 1.30 specification---none of the Offset
    variants allow samplerCube.  This must have been a cut and paste error
    from textureGrad, which /does/ allow cubemaps.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6a77f36ad9570c73b9a2a00302289832267eea99
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Nov 9 21:54:26 2011 -0800

    glsl: Fix misnamed textureProjOffset prototypes in built-in profiles.
    
    Due to a cut and paste error, these were accidentally misnamed
    textureProj() rather than textureProjOffset().
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2eb43bbb77f42b461632a622647874c22d7b9a5a
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Oct 26 13:12:18 2011 -0700

    glsl: Remove texture built-ins with 'bias' from 1.30 VS profile.
    
    From the GLSL 1.30 spec, section 8.7 "Texture Lookup Functions":
    "In all functions below, the bias parameter is optional for fragment
     shaders.  The bias parameter is not accepted in a vertex shader."
    
    This was a cut and paste mistake.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=51b1d412ec5d0699d182b895daacb3b78da328ad
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Thu Oct 27 23:04:00 2011 -0700

    i965: Put a proper sampler count in 3DSTATE_VS.
    
    See similar code for 3DSTATE_WM.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=29fc0d8c8af486d79298650b7e07dee16b3ec4ba
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sun Nov 6 22:51:53 2011 -0800

    i965: Upload SAMPLER_STATE pointers for the VS on Ivybridge.
    
    See similar code in gen7_wm_state.c.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=32dfa6e5ef3d1fb703ec34942c55408be22e7ec3
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Thu Oct 27 22:49:09 2011 -0700

    i965: Move and rename "wm sampler" fields to just "sampler".
    
    brw_wm_samplers actually enables any active samplers regardless of what
    pipeline stage is using them, so it doesn't make much sense for it to be
    WM-specific.  So, rename it to "brw_samplers."
    
    To properly generalize it, move sampler_count and sampler_offset from
    brw_context::wm to a new brw_context::sampler that can be shared without
    looking strange.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=91043c21f9b82054060311aabb617dd6e5058602
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sun Nov 6 22:41:26 2011 -0800

    i965: Clean up code for VS pull constant surface creation.
    
    Like for the WM pull constants, we can merge the former prepare/emit
    stages into one tracked state atom.  Furthermore, the code that used to
    handle the binding table was removed in the last commit, leaving some
    rather silly looking short functions that can easily be folded in.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e7c29c5de82f6de3d30ed1143d9672dd2e25f0e7
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sun Oct 30 16:03:13 2011 -0700

    i965: Use a single binding table for all pipeline stages.
    
    Although the hardware supports separate binding tables for each pipeline
    stage, we don't see much advantage over a single shared table.
    
    Consider the contents of the binding table:
    - Textures (16)
    - Draw buffers (8)
    - Pull constant buffers (1 for VS, 1 for WM)
    
    OpenGL's texture bindings are global: the same set of textures is
    available to all shader targets.  So our binding table entries for
    textures would be exactly the same in every table.
    
    There are only two pull constant buffers (not many), and although draw
    buffers aren't interesting to the VS, it shouldn't hurt to have them in
    the table.  The hardware supports up to 254 binding table entries, and
    we currently only use 26.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4a42bd3931d6298ab9a84b76957ce5d83d289f69
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Nov 2 13:50:02 2011 -0700

    i965: Split brw_wm_surfaces state into renderbuffer and texture atoms.
    
    First, the texturing setup code is relevant for all pipeline stages,
    while renderbuffer surfaces are only used by the WM.
    
    Secondly, renderbuffer and texture setup depends on a different set of
    dirty bits.  There's no reason to walk the array of textures when
    changing draw buffers, or vice-versa.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a7d0fa209b444e3c7ad9358f1d31e3f638c20e40
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Nov 1 16:19:39 2011 -0700

    i965: Combine the two WM pull constant tracked state atoms.
    
    These were only split for historical reasons: brw_wm_constants used to
    be the "prepare" step, while brw_wm_constant_surface was "emit".  Now
    that both happen at emit time, it makes sense to combine them.
    
    Call the newly combined state atom "brw_wm_pull_constants" to indicate
    help distinguish it from the Gen6+ atoms that handle push constants.
    
    Finally, remove the BRW_NEW_WM_CONSTBUF dirty bit entirely now that it's
    never flagged nor used.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f3e9ccb3bcd174a0b55cae6f9c56835145558e89
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Thu Nov 3 22:41:37 2011 -0700

    i965: Rename gen6_*_constants tracked state atoms to "push_constants".
    
    When reading the "brw_wm_constants" and "gen6_wm_constants" atoms
    side-by-side, I initially failed to notice the crucial difference:
    the Gen6 atoms are for Push Constants, while brw_wm_constants handles
    Pull Constants.  (Gen4/5 Push Constants are handled by "brw_curbe.")
    
    Renaming these should clarify the code and save me from constant
    confusion over the fact that "gen6_wm_constants" isn't just a newer
    version of "brw_wm_constants."
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4b1c9b4bebd8f1fe851617e9ad350e45435e130
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Nov 1 16:08:03 2011 -0700

    i965: Remove nr_surfaces computation from brw_update_wm_surfaces.
    
    This code is fairly fragile, as it depends on the ordering of the
    entries in the binding table, which will change soon.
    
    Also, stop listening on the BRW_NEW_WM_CONSTBUF dirty bit as it's no
    longer required.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ba9090ea05e817bd38c1fcc63c53168b16593c7
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Nov 1 10:54:08 2011 -0700

    i965: Use 0 for the number of binding table entries in 3DSTATE_(VS|WM).
    
    These fields control how many entries the hardware prefetches into the
    state cache, so they only impact performance, not correctness.  However,
    it's not clear how to use this in a way that's beneficial.
    
    According to the documentation, kernels "using a large number" of
    entries may wish to program this to zero to avoid thrashing the cache;
    it's unclear how many is too many.  Also, Ironlake's WM was missing this
    feature entirely---the count had to be zero.
    
    The dirty bit tracking to handle this complicates the surface state
    and binding table setup; removing it should simplify things and make
    future refactoring easier.  So just set 0 for the number of entries
    rather than trying to compute and track it.
    
    Appears to have no impact on Nexuiz and OpenArena on Sandybridge.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0983c6869bead0c31c62e5b1dda7f70898d43971
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Nov 1 10:34:27 2011 -0700

    i965: Remove outdated comment about CACHE_NEW_SURF_BIND dirty bit.
    
    The comment states that brw_update_vs_constant_surface produces a
    CACHE_NEW_SURF_BIND dirty bit, but it doesn't.   In fact, that bit
    no longer even exists.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d1d86dc55c852815e8b32c264b8c469fab0ca745
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Nov 8 11:32:52 2011 -0800

    i965: Remove BRW_NEW_NR_VS_SURFACES dirty bit from brw_vs_surfaces.
    
    brw_vs_surfaces _produces_ the BRW_NEW_NR_VS_SURFACES dirty bit, so it
    makes no sense for it to subscribe to it.
    
    Fixes an assertion failure in many piglit tests when INTEL_DEBUG is set:
      brw_state_upload.c:484: void brw_upload_state(struct brw_context *):
      Assertion `!check_state(&examined, &generated)' failed.
    
    One such piglit test is vs-uniform-array-mat2-col-rd.shader_test.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7c057f2360106488365e07af8055b4c696d855a3
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Nov 8 11:21:00 2011 -0800

    i965: Add missing CACHE_NEW_WM_PROG dirty bit to WM pull constants.
    
    Comparing brw_upload_vs_pull_constants and brw_upload_wm_pull_constants,
    it became evident that something was amiss: the VS code had both
    CACHE_NEW_VS_PROG and BRW_NEW_VERTEX_PROGRAM, while the WM code was
    missing the CACHE_NEW_WM_PROG flag.
    
    Not observed to fix anything, but likely necessary.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c3e3903a9089043b280c461a72dab5158dc25d32
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Nov 1 15:41:48 2011 -0700

    i965: Use new vtable entries for surface state updating functions.
    
    Now that we have vtable entries in place, we should use them.  This
    allows us to drop the cut and pasted Gen7 brw_tracked_state atoms as
    they now do exactly the same thing as their brw_wm_surface_state
    counterparts.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d448b42b7143a1a38911b23d94b5c5d5bfa79f0
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Nov 1 14:30:26 2011 -0700

    i965: Add new vtable entries for surface state updating functions.
    
    Gen7+ SURFACE_STATE is different from Gen4-6, so we need separate
    per-generation functions for creating and updating it.  However, the
    usage is the same, and callers just want to utilize the appropriate
    functions with minimal pain.  So, put them in the vtable.
    
    Since these take a brw_context pointer and are only used on Gen4, just
    add a forward declaration.  This is the simplest (if not cleanest)
    solution.  It would be nicer to have a i965-specific vtable, but that's
    a refactor for another day.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>




More information about the mesa-commit mailing list