Mesa (master): 40 new commits

Younes Manton ymanton at kemper.freedesktop.org
Mon Mar 15 05:18:43 UTC 2010


URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9b3a908736130a62d79305586364f625a88a69ee
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Mar 13 17:42:57 2010 +0100

    nvfx: remove src_native_swz, which was a no-op
    
    src_native_swz was used to translate 0/1 swizzles back when Gallium
    supported them.
    
    That support was later removed from Gallium, and the function currently
    always returns true.
    
    Remove it.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=49f2a89956203a99be37a6fb18a1fab79c5e5429
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 18:17:03 2010 +0100

    nvfx: clean up shader header
    
    Currently the behavior of shader.h depends on some constants that
    are defined differently in vertex and fragment programs.
    
    This patch cleans that up by splitting the relevant symbols in
    vertex program and fragment program variants

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a174db480b9dbe3ae3475ce0cf4b3591234e8f05
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Mon Feb 22 13:22:24 2010 +0100

    nvfx: draw: make swtnl draw_elements actually work.
    
    It was totally broken: the index buffer was passed as NULL!

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=152dffd3e196208a85148c4a2f7a9a6df44f3bff
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Mon Feb 22 13:18:10 2010 +0100

    nvfx: draw: emit color as floating point
    
    Don't lose precision by converting to u8.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac7ae8bc6ae0d364103d655482a522c12504816b
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Mon Feb 22 13:15:24 2010 +0100

    nvfx: draw: make perspective corrective texturing work
    
    We must divide everything in the position by w, and emit position as
    a 4-component vector.
    
    Not sure why we must divide, but it works (see progs/redbook/checker).

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ad2d0c26393760ebc7af52de9f693654381431f3
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Mon Feb 22 12:35:18 2010 +0100

    nvfx: draw: create draw vp with ureg
    
    This avoids duplicating the vertex program generation logic and
    makes the same code work for both nv30 and nv40.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d40a069206ea76feafe35c417d79c8bd5d62b4c1
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Mon Feb 22 11:44:31 2010 +0100

    nvfx: add NOUVEAU_SWTNL to force swtnl at runtime
    
    Replace the FORCE_SWTNL macro with a NOUVEAU_SWTNL environment variable.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dbe63ed3b688fc1b2714d1418a031210c9e00d3b
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Mon Feb 22 20:14:32 2010 +0100

    nvfx: move nv04_surface_2d.c into nvfx directory
    
    It is only used on pre-nv50 and nvfx is the only Gallium pre-nv50 driver.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e1580ce4c9ec1175296504c0ae9f26d9d8e0e635
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Mon Feb 22 14:13:17 2010 +0100

    nvfx: fix quads drawing
    
    The primitive splitting code is totally broken and will be rewritten.
    
    Fix the most important bug now though.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0192a4a825d3d04b1588bdabad629a9888f325d6
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Tue Mar 2 22:51:39 2010 +0100

    nvfx: fix viewport state after bypass removal for swtnl
    
    The adjustment of nv30/nv40 after the removal of bypass incorrectly
    removed the hardware viewport bypass code, which we still need for
    swtnl and also forgot to remove NVFX_NEW_RAST from pipe.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f9d09a2e7859a2cf025d71b7c3cb189edb6688c4
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 15:13:12 2010 +0100

    nv30, nv40: move last files to nvfx/ and rm -rf nv30 nv40
    
    This is the last nvfx unification patch.
    
    nv[34]0_fragtex.c are moved to the common directory
    nv[34]0_shader.h are renamed to nv[34]0_vertprog.h and moved to
    the common directory
    
    The separate nv30 and nv40 directories are removed from the build
    system

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d210fa05f286eb19398ac2f8c8f631f6f83c859
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Wed Feb 24 15:08:48 2010 +0100

    nv30, nv40: partially non-trivially unify sampler state in nv[34]0_state.c
    
    Many things, like texture wrap modes and min/mag filters are common.
    
    Some others, like annisotropy and lod settings, are not.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5bb68e5d174afa7a177c5e972fa80bf66e37f6ab
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 15:07:17 2010 +0100

    nv30, nv40: partially non-trivially unify nv[34]0_fragtex.c
    
    The bulk files cannot be unified, but the frontend can and allows to
    share some code and simplify state_emit.c

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=da5103c3b382ca08368a19a195a24278596db4cb
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 14:40:32 2010 +0100

    nv30, nv40: unify nv[34]0_context.c
    
    They are now almost identical, except for nv30 vs nv40 fragtex
    initialization.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6992be543383ba0850bd813153def24ab4e28911
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 14:38:04 2010 +0100

    nv30, nv40: fully unify nv[34]0_context.h
    
    Move the remaining content to the common header.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=10f464fc1073e8f3b53dbcf2209a2204f4924094
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 14:31:27 2010 +0100

    nv30, nv40: non-trivially unify nv[34]0_screen.c
    
    The files have the same structure but are substantially different.
    
    They are unified with appropriate conditionals.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=840c36f5e6d940343a3154af7e76fec341ca46e6
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 13:33:48 2010 +0100

    nv30, nv40: non-trivially unify nv[34]0_vertprog.c
    
    vertprog.c is similar but has substantial differences:
    1. nv40 supports clip planes
    2. nv40 uses a more advanced register allocator
    3. Some register setup is different
    4. Constants with the same name have different values
    
    This patch unifies the two files.
    nv30 gains clip plane support and the nv40 register allocator.
    
    A new NVFX_VP(x) macro is introduced that at runtime resolved to
    either the nv30 or the nv40 constant value.
    
    nv30 clip planes are not tested and might not work

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c65a8f3ed2ab1650df38a3ed32d1e91e84b50520
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 12:39:21 2010 +0100

    nv30, nv40: partially unify nv[34]0_state.c
    
    state.c is identical except for:
    1. Sampler state creation is different
    2. nv40 swtnl support
    3. Separate blend equations on nv40
    
    This patch unifies nv[34]0_state.c, except the sampler state creation code.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e1d0fc5eba8cda4f4c8f3188f53fec6d2d2e9c3
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 11:12:08 2010 +0100

    nv30, nv40: unify nv[34]0_vbo.c
    
    The files are identical, except for swtnl support which is commented
    out on nv30 and restart being initialized on nv30 to avoid a compiler
    warning.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f9eafeca297497a94c438ea28ed59f3a45ed2566
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 11:17:55 2010 +0100

    nv30, nv40: non-trivially unify nv[34]0_draw.c
    
    nv30_draw.c is a stub.
    
    This patch makes both nv30 and nv40 use the nv40 swtnl path.
    
    Note that this doesn't actually work on nv30 because the vertex program is
    encoded in the nv40-only layout.
    
    However, swtnl was unimplemented before on nv30, so this is not a regression.
    Furthermore, a patch to fix this is available near the end of the patchset.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bcb37411fc9159a5c1af50b7defbf1f526b50793
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 10:55:41 2010 +0100

    nv30, nv40: non-trivially unify nv[34]0_fragprog.c
    
    The files are mostly the same except:
    1. On NV40, some TGSI instructions are emulated with several hardware ones
    2. Some instructions such as DDX/DDY, and STR were missing from nv30
    3. NV40 has more sophisticated register management
    
    nv30 now supports all instructions and uses the nv40 register management.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9e396ce4a124529fa92ad967f2b3ff72534079b
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 02:26:25 2010 +0100

    nv30, nv40: non-trivially partially unify nv[34]0_shader.h
    
    shader.h is similar, except for the following differences:
    1. The instruction sets are not exactly the same, but mostly similar
    2. Vertex program fields are in different bit positions
    
    This patch unifies all parts of nv[34]0_shader.h except the vertex
    program fields.
    
    Vertex opcodes are also changed so that the constant names includes
    SCA if it is a scalar opcode and VEC if it is a vector opcode.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd0d03adab65a9586e0c5d60e9ee487677914f3b
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 00:59:30 2010 +0100

    nv30, nv40: non-trivially unify nv[34]0_state_fb.c
    
    The files are significantly different due to:
    1. nv30 support 2 render targets, nv40 4
    2. z-buffer pitch is set differently
    3. nv30 has a limitation of colour_bits >= zeta_bits. This may not
       actually exist in the driver though
    4. nv30 points color0 at depth in the depth-only case
    5. nv30 sets NV34TCL_VIEWPORT_TX_ORIGIN to 0. This is probably
       unnecessary
    
    This patch attempts to unify the two files and preserve the existing
    behavior.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4d93ef1a015c8ec7341b0793e87ec375014436b3
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 23:30:59 2010 +0100

    nv30, nv40: unify nv[34]0_state_viewport.c
    
    The files are identical, except for an extra comment in nv30.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9937116c7b15468088a224da478d927347a76f32
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 19:39:24 2010 +0100

    nv30, nv40: unify nv[34]0_query.c
    
    The files are identical except formatting.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8611a31bb401fcc2bdc0b3624859fffff7236c4b
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 19:32:29 2010 +0100

    nv30, nv40: unify nv[34]0_miptree.c
    
    The only difference between nv30 and nv40 is that nv30 allowed swizzling
    for more texture types.
    
    This patch preserves the existing behavior, using conditional code.
    
    Note however that this does not make sense, since all texture types can
    be swizzled on nv40 and probably on nv30 too.
    
    However, the handling of swizzled surfaces in the current 2D code is
    partially broken, so it's best not to touch this.
    
    A whole rewrite of the 2D code will be submitted, which will solve this
    problem.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e392e0b148d6b499322e58a84f300e2e0be49e29
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 19:22:57 2010 +0100

    nv30, nv40: unify nv[34]0_state_stipple.c
    
    The files are identical, except for the fact that the nv40 version
    forgets to unreference the stateobj.
    
    Unified to the correct nv30 version.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=64d882637dc97b332eb3c0f457376f86b75c8c5f
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 23:19:40 2010 +0100

    nv30, nv40: unify identical nv[34]0_state_zsa.c

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=938c6905cfa4e25c8e898c8d91ee0fe8174abe0b
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 23:17:41 2010 +0100

    nv30, nv40: unify identical nv[34]0_state_scissor.c

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ada801222b3c984c260165415864a8f511145251
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 23:16:01 2010 +0100

    nv30, nv40: unify identical nv[34]0_state_rasterizer.c

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b55e1cd17801a03d6fbb7ce46f25aa2b086bff4
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 20:37:17 2010 +0100

    nv30, nv40: unify identical nv[34]0_state_blend.c

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=778c64da97272e7508dbcdf0bffdb699d1b04ce0
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 11:33:15 2010 +0100

    nv30, nv40: non-trivially unify nv[34]0_state_emit.c
    
    The files are the same except for swtnl support on nv40 and for
    texture cache flushing on nv40.
    
    Unify them, and use a macro to define 4 versions of render_states,
    for all combinations of nvfx and hwtnl/swtnl.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d084d189d03dc89a3161a131f1b386840c06ad61
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 20:07:10 2010 +0100

    nv30, nv40: unify identical nv[34]0_transfer.c

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c5c7b69bda3fb49fd88b846feb6e65289a04488a
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 20:04:54 2010 +0100

    nv30, nv40: unify identical nv[34]0_clear.c

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6321a183319fdcb2ebee757b7f0922efe3f919db
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 19:52:22 2010 +0100

    nvfx: add nvfx directory to build system
    
    Will be used to hold source files unified between nv30 and nv40.
    
    Eventually all nv30 and nv40 code will be moved there and the
    nv30 and nv40 directories will be removed.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6518a1c853e82a42b28027b1304babd4f02f98ef
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Feb 21 13:40:49 2010 +0100

    nv30, nv40: add is_nv4x member to context and screen structs
    
    This will make it faster to check for nv40.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8e56d4cddbd9c491b940e3ce5974c526802c752
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 18:37:43 2010 +0100

    nv30, nv40: unify all structures and headers, except shaders
    
    This patch unifies nv[34]0_screen.h, nv[34]0_context.h and
    nv[34]0_state.h
    
    The unified files are put in a new "nvfx" directory.
    
    nv30_context.h and nv40_context.h still exist to hold the function
    prototypes and include nvfx_context.h
    
    nv[34]0_screen.h and nv[34]0_state.h are deleted, replaced by the
    unified versions.
    
    nv40 includes some extra fields for swtnl and user clip planes
    support.
    
    These fields will be unused on nv30 until that functionality gets
    added to it too (by unification with nv40).

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d673c92810636dcc6de33d3618d494ce9f5717c1
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 18:34:00 2010 +0100

    nouveau: s/rankine/eng3d/g; s/curie/eng3d/g
    
    Result of running:
    perl -i -p -e 's/rankine/eng3d/g; s/curie/eng3d/g;' nv[34]0/*.[ch]
    
    This will allow to more easily unify nv30 and nv40.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1771d8f8f4256773de1883a033081f9cc4cddf00
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 18:18:48 2010 +0100

    nv30: remove unused on_hw field and constant fp_reg_control field
    
    This makes nv30_state.h equivalent to nv40_state.h

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5f71414fc941f0d390c03633f1a53534807cfca6
Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sat Feb 20 17:43:31 2010 +0100

    nv40: use NV34TCL_ constants where available
    
    It was decided to just use the NV34TCL_ constants for constants
    common between nv30 and nv40, and deprecate the NV40TCL_ versions.
    
    This patch changes the nv40 driver to use NV34TCL_ constants for
    common functionality.
    
    This reduces differences between nv30 and nv40 to ease further
    unification.




More information about the mesa-commit mailing list