Mesa (master): 38 new commits

Paul Berry stereotype441 at kemper.freedesktop.org
Tue Sep 6 18:26:50 UTC 2011


URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=becd54eedb26ec9076e6f5f98f485861b3e13a90
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Sat Sep 3 08:42:28 2011 -0700

    i965: Remove two_side_color from brw_compute_vue_map().
    
    Since we now lay out the VUE the same way regardless of whether
    two-sided color is enabled, brw_compute_vue_map() no longer needs to
    know whether two-sided color is enabled.  This allows the two-sided
    color flag to be removed from the clip, GS, and VS keys, so that fewer
    GPU programs need to be recompiled when turning two-sided color on and
    off.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f2b09257ba04a8f50c58e208ca8ab66cfa362298
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Sat Sep 3 08:23:27 2011 -0700

    i965: For GEN6+, always make front/back colors adjacent in VUE.
    
    When doing two-sided color on GEN6+, we use the SF unit's
    INPUTATTR_FACING mode to cause front colors to be used on front-facing
    triangles, and back colors to be used on back-facing triangles.  This
    mode requires that the front and back colors be adjacent in the VUE.
    
    Previously, we would only place front and back colors adjacent in the
    VUE when two-sided color was enabled.  Now we place them adjacent in
    the VUE whether two-sided color is enabled or not.  (We still only
    swizzle the colors when two-sided color is enabled, so there should be
    no user-visible change).
    
    This simplifies the implementation of the VUE map and reduces the
    amount of code that is dependent on two-sided color mode.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=18dcda2dcff0ba49cf35656bb8936e3edd61c90d
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Aug 30 10:54:14 2011 -0700

    i965: GS: Use the VUE map to compute URB size.
    
    The previous computation had two bugs: (a) it used a formula based on
    Gen5 for Gen6 and Gen7 as well. (b) it failed to account for the fact
    that PSIZ is stored in the VUE header.  Fortunately, both bugs caused
    it to compute a URB size that was too large, which was benign.  This
    patch computes the URB size directly from the VUE map, so it gets the
    result correct in all circumstances.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=78be5bcb222d379a07979de98ff5b9e3549de6a7
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Fri Aug 26 09:30:35 2011 -0700

    i965: clip: Remove no-longer-needed variables.
    
    The variables offset[], idx_to_attr[], nr_bytes, nr_attrs, and
    header_regs were all serving purposes which are now served by the VUE
    map.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4efb32c642507228d5bfebbd6d403dd9944f9b7c
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Fri Aug 26 12:17:56 2011 -0700

    i965: clip: Remove assumption about VUE header from brw_clip_interp_vertex()
    
    Previously, brw_clip_interp_vertex() iterated only through the
    "non-header" elements of the VUE when performing interpolation
    (because header elements don't need interpolation).  This code now
    refers exclusively to the VUE map to figure out which elements need
    interpolation, so that brw_clip_interp_vertex() doesn't need to know
    the header size.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=71cb82f63ab156599613f7555a62ad52d2e3dbd7
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Fri Aug 26 12:08:43 2011 -0700

    i965: clip: Change computation of nr_regs to use VUE map.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2ef1fa6b3c8d52e059bf6ccf519c45604962b27c
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 31 15:34:01 2011 -0700

    i965: clip: Convert computations to ..._to_offset() for clarity.
    
    This patch replaces some ad-hoc computations using ATTR_SIZE and the
    offset[] array to use the VUE map functions
    brw_vert_result_to_offset() and brw_vue_slot_to_offset().
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=54a62f8806df29d79f1e630bae6d1f45fb15c69f
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Thu Aug 25 13:27:57 2011 -0700

    i965: clip: Add a function to determine whether a vert_result is in use.
    
    Previously we would examine the offset[] array (since an offset of 0
    meant "not in use").  This paves the way for removing the offset[]
    array.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=620f06b12600d509406543738ed8bff27715df2c
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Thu Aug 25 11:14:47 2011 -0700

    i965: clip: Rework brw_clip_interp_vertex() to use the VUE map.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c46be4273cf392a8ea53dc95881ea1e4452170b1
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Thu Aug 25 10:42:29 2011 -0700

    i965: clip: Modify brw_clip_interp_vertex() to use the VUE map.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5a93019a873d4388e80b334982d535c23bbd607f
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Thu Aug 25 09:58:30 2011 -0700

    i965: clip: Move header_regs into brw_clip_compile.
    
    This makes header_regs available for computing VUE offsets within clip code.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2bc421845e7d334bc5a91b62d834b8f77e769570
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Thu Aug 25 08:06:31 2011 -0700

    i965: clip: Modify brw_clip_tri_alloc_regs() to use the VUE map.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=62b0c8561e2d259e4dc1f27346bf2f36c3b098c8
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 24 20:03:35 2011 -0700

    i965: clip: Move hpos_offest and ndc_offset into local functions.
    
    The offsets within the VUE of HPOS and NDC are needed only in a few
    auxiliary clipping functions.  This patch moves computation of those
    offsets into the functions that need them, and does the computation
    using the VUE map.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eae5b5c44e58ad2937600991a5569518d3023f68
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 24 19:57:51 2011 -0700

    i965: clip: rename header_position_offset to the more correct ndc_offset.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=514eeca32c37c8b4267edbd3c3657946536c639c
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 24 19:51:54 2011 -0700

    i965: clip: Add VUE map computation to clip stage for Gen4-5.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9660e3b788227de4aa15c42c5bbd48b85ad46d24
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 31 09:31:00 2011 -0700

    i965: SF: Change gen{6,7}_sf_state.c to compute URB read length based on VUE map.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc60a07d88e57bc51b153888181d11d3a0ca7d7f
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 31 09:33:57 2011 -0700

    i965: SF: Move outputs_written to a local variable for clarity.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2d909f431c67d0c8c5075dc40f2901076c5bc48b
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Aug 30 13:06:14 2011 -0700

    i965: SF: New implementation of get_attr_override using the VUE map.
    
    This patch changes get_attr_override() (which computes the
    relationship between vertex shader outputs and fragment shader inputs)
    to use the VUE map.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bbc53d6285efc664b9b9f326cdcd82a9414507c1
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 24 19:04:31 2011 -0700

    i965: SF: Remove unnecessary variables.
    
    This patch removes the variables nr_attrs and nr_setup_attrs, whose
    purpose is now being served by the VUE map.  nr_attr_regs and
    nr_setup_regs are still needed, however they are now computed using
    the VUE map rather than by counting the number of vertex shader
    outputs (which caused subtle bugs when gl_PointSize was written).
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=58d9c95b3cb54383d07ca5560a1685fbe8588860
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 24 18:57:32 2011 -0700

    i965: SF: Stop using nr_setup_attrs in compute_masks.
    
    Previously, the SF used nr_setup_attrs to determine whether it was
    looking at the last element of the VUE.  Changed this code to use the
    VUE map.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=08f030baec3d13805c5800183550d8ad88ed8881
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 24 18:41:30 2011 -0700

    i965: SF: Remove attr_to_idx and idx_to_attr.
    
    These data structures were serving the same purpose as the VUE map,
    but were buggy.  Now that the code has been transitioned to use the
    VUE map, they are not needed.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=84e7d04e1d2ac9621c5fbb0f878164e7c16d2cf7
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 24 15:48:55 2011 -0700

    i965: SF: Change calculate_masks to use the VUE map.
    
    Previously, SF code used the idx_to_attr[] array to compute the
    location of entries in the VUE map.  This array didn't properly
    account for gl_PointSize.  Now we use the VUE map directly.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=aafe2cdf86c22da6c1266f307d89b1c80b59562f
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 24 15:32:17 2011 -0700

    i965: SF: Change the flags that refer to "attr" to be based on gl_vert_result.
    
    Previously, some of the code in SF erroneously used bitfields based on
    the gl_frag_attrib enum when actually referring to vertex results.
    This worked, because coincidentally the particular enum values being
    used happened to match between gl_frag_attrib and gl_vert_result.  But
    it was fragile, because a future change to either gl_vert_result or
    gl_frag_attrib would have made the enum values stop matching up.  This
    patch switches the SF code to use the correct enum.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8b362477d931af40e1a00fc308ebd0b25b722aa2
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 24 12:19:10 2011 -0700

    i965: SF: change get_vert_attr to use the VUE map, and rename it.
    
    The new function, called get_vert_result(), uses the VUE map to find
    the register containing a given vertex attribute.  Previously, we used
    the attr_to_idx[] array, which served the same purpose but didn't
    account for gl_PointSize correctly.
    
    This fixes a bug on pre-Gen6 wherein the back side of a triangle would
    be rendered incorrectyl if the vertex shader wrote to gl_PointSize.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4a1fb81902a7863d5dfe304e5e4ca2c631159be1
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Aug 23 15:49:32 2011 -0700

    i965: SF: Modify calculate_point_sprite_mask to use the VUE map.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=39fc725b0c81db8d76cb490488cd95de5c4d7a79
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Aug 23 13:49:19 2011 -0700

    i965: SF: Move the computation of urb_entry_read_offset.
    
    This patch moves the computation of the SF URB entry read offset from
    upload_sf_unit() to its own function, so that it can be re-used when
    creating the gen4-5 SF program.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f3ecc90730c1637b82e7a8eb8bef6d9a7a0531e8
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Aug 23 11:43:46 2011 -0700

    i965: new VS: Compute urb entry size based on the VUE map.
    
    Previously, the new VS backend computed the size of the URB entry by
    counting the number of MRFs used in emitting the URB entry.  Now it
    just gets it straight from the VUE map.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee3195a5ff9ce3e549fd254ecd751319a0bd9db5
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Aug 23 11:41:41 2011 -0700

    i965: new VS: Clarify comments about max_usable_mrf and add an assertion.
    
    max_usable_mrf has been carefully set such that (max_usable_mrf -
    base_mrf) is a multiple of 2, so that an even number of VUE slots are
    emitted with each URB write (which Gen6 requires).  This patch adds an
    assertion to confirm that this is the case, and moves the comment to
    this effect to be near the assertion.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e604f98f580b74dd6c597ef492706ce74697443e
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Aug 23 11:07:56 2011 -0700

    i965: new VS: use the VUE map to write out vertex attributes.
    
    Previously, the new VS backend used two functions,
    emit_vue_header_gen6() and emit_vue_header_gen4() to emit the fixed
    parts of the VUE, and then a pair of carefully-constructed loops to
    emit the rest of the VUE, leaving out the parts that were already
    emitted as part of the header.
    
    This patch changes the new VS backend to use the VUE map to emit the
    entire VUE.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d1435a49e9765ab4e988dd8b65a5599da34f3512
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Aug 23 10:41:31 2011 -0700

    i965: new VS: move clip distance computation (GEN5+) to a separate function.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9eca0b27903acef97f7b69a70dc791b433f1c98
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Aug 23 10:29:48 2011 -0700

    i965: new VS: Move PSIZ/flags computation to a separate function.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f86d1976f81811aec0a555946e263295ed1403db
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Aug 23 10:26:15 2011 -0700

    i965: new VS: move NDC computation (GEN4-5) to a separate function.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=34fbab2125555ba0afffa361e1c74fb3359ef3a7
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Aug 23 10:17:34 2011 -0700

    i965: new VS: Use output_reg[] to find NDC and HPOS registers.
    
    Previously, emit_vue_header_gen4() used local variables to keep track
    of which registers were storing the NDC and HPOS.  This patch uses the
    output_reg[] array instead, so that the code that manipulates NDC and
    HPOS can be more easily refactored.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=85e57eb9cada5c97d49e11295e23cc6e472b3130
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Mon Aug 22 22:09:02 2011 -0700

    i965: old VS: use the VUE map to compute the URB entry size.
    
    Previously, the old VS backend computed the URB entry size by adding
    the number of vertex shader outputs to the size of the URB header.
    This often produced a larger result than necessary, because some
    vertex shader outputs are stored in the header, so they were being
    double counted.  This patch changes the old VS backend to compute the
    URB entry size directly from the number of slots in the VUE map.
    
    Note: there's a subtle change in that we no longer count header
    registers towards the size of the VF input.  I believe this is
    correct, because the header is only emitted in the output of the VS
    stage--it is not present in the input.  (As evidence for this, note
    that brw_vs_state.c sets urb_entry_read_offset to 0--it does not
    include space for the header as part of the VS input).
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3c17efd14888e453d1a15d92e97c99f2a278e213
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 31 15:04:42 2011 -0700

    i965: old VS: Use brw_vue_map instead of implicit assumptions about VUE structure.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7bb2dbfc9765c97d9c53ad954342419338018474
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Thu Sep 1 15:30:21 2011 -0700

    i965: Add functions to compute offsets within the VUE map.
    
    Some parts of the i965 driver keep track of locations within the VUE
    (vertex URB entry) using byte offsets.  This patch adds inline
    functions to compute these byte offsets using the VUE map.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=45f1d7a66666d849031ffc2b8647149e17cc13bc
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Aug 31 15:04:23 2011 -0700

    i965: Write code to compute a VUE map.
    
    Several places in the i965 code make implicit assumptions about the
    structure of data in the VUE (vertex URB entry).  This patch adds a
    function, brw_compute_vue_map(), which computes the structure of the
    VUE explicitly.  Future patches will modify the rest of the driver to
    use the explicitly computed map rather than rely on implicit
    assumptions about it.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6489a1d5bab75589569658d374257bf23cb67a23
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Aug 30 11:46:29 2011 -0700

    Refactor code that converts between gl_vert_result and gl_frag_attrib.
    
    Previously, this conversion was duplicated in several places in the
    i965 driver.  This patch moves it to a common location in mtypes.h,
    near the declaration of gl_vert_result and gl_frag_attrib.
    
    I've also added comments to remind us that we may need to revisit the
    conversion code when adding elements to gl_vert_result and
    gl_frag_attrib.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>




More information about the mesa-commit mailing list