Merge branch 'master' into libkms-master
authorJakob Bornecrantz <jakob@vmware.com>
Tue, 5 Jan 2010 19:59:24 +0000 (20:59 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Tue, 5 Jan 2010 19:59:24 +0000 (20:59 +0100)
Conflicts:
configure.ac

24 files changed:
configure.ac
include/drm/Makefile.am
include/drm/vmwgfx_drm.h [new file with mode: 0644]
intel/intel_bufmgr_gem.c
nouveau/nouveau_bo.c
nouveau/nouveau_channel.c
nouveau/nouveau_class.h
nouveau/nouveau_private.h
nouveau/nouveau_pushbuf.c
nouveau/nouveau_pushbuf.h
radeon/Makefile.am
radeon/radeon_bo.c [new file with mode: 0644]
radeon/radeon_bo.h
radeon/radeon_bo_gem.c
radeon/radeon_bo_int.h [new file with mode: 0644]
radeon/radeon_cs.c [new file with mode: 0644]
radeon/radeon_cs.h
radeon/radeon_cs_gem.c
radeon/radeon_cs_int.h [new file with mode: 0644]
radeon/radeon_cs_space.c
radeon/radeon_track.c [deleted file]
radeon/radeon_track.h [deleted file]
tests/modetest/modetest.c
xf86drm.c

index d4b7d78b6f6bd6de7817511753970aefb9ea4a10..b95731452deee756a376c07f0c6d400709f985df 100644 (file)
@@ -19,7 +19,7 @@
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 AC_PREREQ(2.60)
-AC_INIT([libdrm], 2.4.16, [dri-devel@lists.sourceforge.net], libdrm)
+AC_INIT([libdrm], 2.4.17, [dri-devel@lists.sourceforge.net], libdrm)
 AC_USE_SYSTEM_EXTENSIONS
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2])
@@ -53,6 +53,11 @@ AC_ARG_ENABLE(intel,
              [Enable support for intel's KMS API (default: auto)]),
              [INTEL=$enableval], [INTEL=auto])
 
+AC_ARG_ENABLE(vmwgfx-experimental-api,
+             AS_HELP_STRING([--enable-vmwgfx-experimental-api],
+             [Install vmwgfx's experimental kernel API header (default: disabled)]),
+             [VMWGFX=$enableval], [VMWGFX=no])
+
 AC_ARG_ENABLE(nouveau-experimental-api,
              AS_HELP_STRING([--enable-nouveau-experimental-api],
              [Enable support for nouveau's experimental API (default: disabled)]),
@@ -141,6 +146,8 @@ fi
 
 AM_CONDITIONAL(HAVE_LIBKMS, [test "x$LIBKMS" = xyes])
 
+AM_CONDITIONAL(HAVE_VMWGFX, [test "x$VMWGFX" = xyes])
+
 AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes])
 
 AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" = xyes])
@@ -226,6 +233,7 @@ echo "$PACKAGE_STRING will be compiled with:"
 echo ""
 echo "  libkms         $LIBKMS"
 echo "  Intel API      $INTEL"
+echo "  vmwgfx API     $VMWGFX"
 echo "  Radeon API     $RADEON"
 echo "  Nouveau API    $NOUVEAU"
 echo ""
index 1db5acc30d5f6b1294b0ab7acb0eded60e02eacd..9046955f9559917bdbc9cc46456a835d726a0d8b 100644 (file)
@@ -36,3 +36,8 @@ klibdrminclude_HEADERS = \
        sis_drm.h \
        via_drm.h \
        mach64_drm.h
+
+
+if HAVE_VMWGFX
+klibdrminclude_HEADERS += vmwgfx_drm.h
+endif
diff --git a/include/drm/vmwgfx_drm.h b/include/drm/vmwgfx_drm.h
new file mode 100644 (file)
index 0000000..2be7e12
--- /dev/null
@@ -0,0 +1,574 @@
+/**************************************************************************
+ *
+ * Copyright © 2009 VMware, Inc., Palo Alto, CA., USA
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef __VMWGFX_DRM_H__
+#define __VMWGFX_DRM_H__
+
+#define DRM_VMW_MAX_SURFACE_FACES 6
+#define DRM_VMW_MAX_MIP_LEVELS 24
+
+#define DRM_VMW_EXT_NAME_LEN 128
+
+#define DRM_VMW_GET_PARAM            0
+#define DRM_VMW_ALLOC_DMABUF         1
+#define DRM_VMW_UNREF_DMABUF         2
+#define DRM_VMW_CURSOR_BYPASS        3
+/* guarded by DRM_VMW_PARAM_NUM_STREAMS != 0*/
+#define DRM_VMW_CONTROL_STREAM       4
+#define DRM_VMW_CLAIM_STREAM         5
+#define DRM_VMW_UNREF_STREAM         6
+/* guarded by DRM_VMW_PARAM_3D == 1 */
+#define DRM_VMW_CREATE_CONTEXT       7
+#define DRM_VMW_UNREF_CONTEXT        8
+#define DRM_VMW_CREATE_SURFACE       9
+#define DRM_VMW_UNREF_SURFACE        10
+#define DRM_VMW_REF_SURFACE          11
+#define DRM_VMW_EXECBUF              12
+#define DRM_VMW_FIFO_DEBUG           13
+#define DRM_VMW_FENCE_WAIT           14
+
+
+/*************************************************************************/
+/**
+ * DRM_VMW_GET_PARAM - get device information.
+ *
+ * DRM_VMW_PARAM_FIFO_OFFSET:
+ * Offset to use to map the first page of the FIFO read-only.
+ * The fifo is mapped using the mmap() system call on the drm device.
+ *
+ * DRM_VMW_PARAM_OVERLAY_IOCTL:
+ * Does the driver support the overlay ioctl.
+ */
+
+#define DRM_VMW_PARAM_NUM_STREAMS      0
+#define DRM_VMW_PARAM_NUM_FREE_STREAMS 1
+#define DRM_VMW_PARAM_3D               2
+#define DRM_VMW_PARAM_FIFO_OFFSET      3
+
+
+/**
+ * struct drm_vmw_getparam_arg
+ *
+ * @value: Returned value. //Out
+ * @param: Parameter to query. //In.
+ *
+ * Argument to the DRM_VMW_GET_PARAM Ioctl.
+ */
+
+struct drm_vmw_getparam_arg {
+       uint64_t value;
+       uint32_t param;
+       uint32_t pad64;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_EXTENSION - Query device extensions.
+ */
+
+/**
+ * struct drm_vmw_extension_rep
+ *
+ * @exists: The queried extension exists.
+ * @driver_ioctl_offset: Ioctl number of the first ioctl in the extension.
+ * @driver_sarea_offset: Offset to any space in the DRI SAREA
+ * used by the extension.
+ * @major: Major version number of the extension.
+ * @minor: Minor version number of the extension.
+ * @pl: Patch level version number of the extension.
+ *
+ * Output argument to the DRM_VMW_EXTENSION Ioctl.
+ */
+
+struct drm_vmw_extension_rep {
+       int32_t exists;
+       uint32_t driver_ioctl_offset;
+       uint32_t driver_sarea_offset;
+       uint32_t major;
+       uint32_t minor;
+       uint32_t pl;
+       uint32_t pad64;
+};
+
+/**
+ * union drm_vmw_extension_arg
+ *
+ * @extension - Ascii name of the extension to be queried. //In
+ * @rep - Reply as defined above. //Out
+ *
+ * Argument to the DRM_VMW_EXTENSION Ioctl.
+ */
+
+union drm_vmw_extension_arg {
+       char extension[DRM_VMW_EXT_NAME_LEN];
+       struct drm_vmw_extension_rep rep;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_CREATE_CONTEXT - Create a host context.
+ *
+ * Allocates a device unique context id, and queues a create context command
+ * for the host. Does not wait for host completion.
+ */
+
+/**
+ * struct drm_vmw_context_arg
+ *
+ * @cid: Device unique context ID.
+ *
+ * Output argument to the DRM_VMW_CREATE_CONTEXT Ioctl.
+ * Input argument to the DRM_VMW_UNREF_CONTEXT Ioctl.
+ */
+
+struct drm_vmw_context_arg {
+       int32_t cid;
+       uint32_t pad64;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_UNREF_CONTEXT - Create a host context.
+ *
+ * Frees a global context id, and queues a destroy host command for the host.
+ * Does not wait for host completion. The context ID can be used directly
+ * in the command stream and shows up as the same context ID on the host.
+ */
+
+/*************************************************************************/
+/**
+ * DRM_VMW_CREATE_SURFACE - Create a host suface.
+ *
+ * Allocates a device unique surface id, and queues a create surface command
+ * for the host. Does not wait for host completion. The surface ID can be
+ * used directly in the command stream and shows up as the same surface
+ * ID on the host.
+ */
+
+/**
+ * struct drm_wmv_surface_create_req
+ *
+ * @flags: Surface flags as understood by the host.
+ * @format: Surface format as understood by the host.
+ * @mip_levels: Number of mip levels for each face.
+ * An unused face should have 0 encoded.
+ * @size_addr: Address of a user-space array of sruct drm_vmw_size
+ * cast to an uint64_t for 32-64 bit compatibility.
+ * The size of the array should equal the total number of mipmap levels.
+ * @shareable: Boolean whether other clients (as identified by file descriptors)
+ * may reference this surface.
+ *
+ * Input data to the DRM_VMW_CREATE_SURFACE Ioctl.
+ * Output data from the DRM_VMW_REF_SURFACE Ioctl.
+ */
+
+struct drm_vmw_surface_create_req {
+       uint32_t flags;
+       uint32_t format;
+       uint32_t mip_levels[DRM_VMW_MAX_SURFACE_FACES];
+       uint64_t size_addr;
+       int32_t shareable;
+       uint32_t pad64;
+};
+
+/**
+ * struct drm_wmv_surface_arg
+ *
+ * @sid: Surface id of created surface or surface to destroy or reference.
+ *
+ * Output data from the DRM_VMW_CREATE_SURFACE Ioctl.
+ * Input argument to the DRM_VMW_UNREF_SURFACE Ioctl.
+ * Input argument to the DRM_VMW_REF_SURFACE Ioctl.
+ */
+
+struct drm_vmw_surface_arg {
+       int32_t sid;
+       uint32_t pad64;
+};
+
+/**
+ * struct drm_vmw_size ioctl.
+ *
+ * @width - mip level width
+ * @height - mip level height
+ * @depth - mip level depth
+ *
+ * Description of a mip level.
+ * Input data to the DRM_WMW_CREATE_SURFACE Ioctl.
+ */
+
+struct drm_vmw_size {
+       uint32_t width;
+       uint32_t height;
+       uint32_t depth;
+       uint32_t pad64;
+};
+
+/**
+ * union drm_vmw_surface_create_arg
+ *
+ * @rep: Output data as described above.
+ * @req: Input data as described above.
+ *
+ * Argument to the DRM_VMW_CREATE_SURFACE Ioctl.
+ */
+
+union drm_vmw_surface_create_arg {
+       struct drm_vmw_surface_arg rep;
+       struct drm_vmw_surface_create_req req;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_REF_SURFACE - Reference a host surface.
+ *
+ * Puts a reference on a host surface with a give sid, as previously
+ * returned by the DRM_VMW_CREATE_SURFACE ioctl.
+ * A reference will make sure the surface isn't destroyed while we hold
+ * it and will allow the calling client to use the surface ID in the command
+ * stream.
+ *
+ * On successful return, the Ioctl returns the surface information given
+ * in the DRM_VMW_CREATE_SURFACE ioctl.
+ */
+
+/**
+ * union drm_vmw_surface_reference_arg
+ *
+ * @rep: Output data as described above.
+ * @req: Input data as described above.
+ *
+ * Argument to the DRM_VMW_REF_SURFACE Ioctl.
+ */
+
+union drm_vmw_surface_reference_arg {
+       struct drm_vmw_surface_create_req rep;
+       struct drm_vmw_surface_arg req;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_UNREF_SURFACE - Unreference a host surface.
+ *
+ * Clear a reference previously put on a host surface.
+ * When all references are gone, including the one implicitly placed
+ * on creation,
+ * a destroy surface command will be queued for the host.
+ * Does not wait for completion.
+ */
+
+/*************************************************************************/
+/**
+ * DRM_VMW_EXECBUF
+ *
+ * Submit a command buffer for execution on the host, and return a
+ * fence sequence that when signaled, indicates that the command buffer has
+ * executed.
+ */
+
+/**
+ * struct drm_vmw_execbuf_arg
+ *
+ * @commands: User-space address of a command buffer cast to an uint64_t.
+ * @command-size: Size in bytes of the command buffer.
+ * @fence_rep: User-space address of a struct drm_vmw_fence_rep cast to an
+ * uint64_t.
+ *
+ * Argument to the DRM_VMW_EXECBUF Ioctl.
+ */
+
+struct drm_vmw_execbuf_arg {
+       uint64_t commands;
+       uint32_t command_size;
+       uint32_t pad64;
+       uint64_t fence_rep;
+};
+
+/**
+ * struct drm_vmw_fence_rep
+ *
+ * @fence_seq: Fence sequence associated with a command submission.
+ * @error: This member should've been set to -EFAULT on submission.
+ * The following actions should be take on completion:
+ * error == -EFAULT: Fence communication failed. The host is synchronized.
+ * Use the last fence id read from the FIFO fence register.
+ * error != 0 && error != -EFAULT:
+ * Fence submission failed. The host is synchronized. Use the fence_seq member.
+ * error == 0: All is OK, The host may not be synchronized.
+ * Use the fence_seq member.
+ *
+ * Input / Output data to the DRM_VMW_EXECBUF Ioctl.
+ */
+
+struct drm_vmw_fence_rep {
+       uint64_t fence_seq;
+       int32_t error;
+       uint32_t pad64;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_ALLOC_DMABUF
+ *
+ * Allocate a DMA buffer that is visible also to the host.
+ * NOTE: The buffer is
+ * identified by a handle and an offset, which are private to the guest, but
+ * useable in the command stream. The guest kernel may translate these
+ * and patch up the command stream accordingly. In the future, the offset may
+ * be zero at all times, or it may disappear from the interface before it is
+ * fixed.
+ *
+ * The DMA buffer may stay user-space mapped in the guest at all times,
+ * and is thus suitable for sub-allocation.
+ *
+ * DMA buffers are mapped using the mmap() syscall on the drm device.
+ */
+
+/**
+ * struct drm_vmw_alloc_dmabuf_req
+ *
+ * @size: Required minimum size of the buffer.
+ *
+ * Input data to the DRM_VMW_ALLOC_DMABUF Ioctl.
+ */
+
+struct drm_vmw_alloc_dmabuf_req {
+       uint32_t size;
+       uint32_t pad64;
+};
+
+/**
+ * struct drm_vmw_dmabuf_rep
+ *
+ * @map_handle: Offset to use in the mmap() call used to map the buffer.
+ * @handle: Handle unique to this buffer. Used for unreferencing.
+ * @cur_gmr_id: GMR id to use in the command stream when this buffer is
+ * referenced. See not above.
+ * @cur_gmr_offset: Offset to use in the command stream when this buffer is
+ * referenced. See note above.
+ *
+ * Output data from the DRM_VMW_ALLOC_DMABUF Ioctl.
+ */
+
+struct drm_vmw_dmabuf_rep {
+       uint64_t map_handle;
+       uint32_t handle;
+       uint32_t cur_gmr_id;
+       uint32_t cur_gmr_offset;
+       uint32_t pad64;
+};
+
+/**
+ * union drm_vmw_dmabuf_arg
+ *
+ * @req: Input data as described above.
+ * @rep: Output data as described above.
+ *
+ * Argument to the DRM_VMW_ALLOC_DMABUF Ioctl.
+ */
+
+union drm_vmw_alloc_dmabuf_arg {
+       struct drm_vmw_alloc_dmabuf_req req;
+       struct drm_vmw_dmabuf_rep rep;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_UNREF_DMABUF - Free a DMA buffer.
+ *
+ */
+
+/**
+ * struct drm_vmw_unref_dmabuf_arg
+ *
+ * @handle: Handle indicating what buffer to free. Obtained from the
+ * DRM_VMW_ALLOC_DMABUF Ioctl.
+ *
+ * Argument to the DRM_VMW_UNREF_DMABUF Ioctl.
+ */
+
+struct drm_vmw_unref_dmabuf_arg {
+       uint32_t handle;
+       uint32_t pad64;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_FIFO_DEBUG - Get last FIFO submission.
+ *
+ * This IOCTL copies the last FIFO submission directly out of the FIFO buffer.
+ */
+
+/**
+ * struct drm_vmw_fifo_debug_arg
+ *
+ * @debug_buffer: User space address of a debug_buffer cast to an uint64_t //In
+ * @debug_buffer_size: Size in bytes of debug buffer //In
+ * @used_size: Number of bytes copied to the buffer // Out
+ * @did_not_fit: Boolean indicating that the fifo contents did not fit. //Out
+ *
+ * Argument to the DRM_VMW_FIFO_DEBUG Ioctl.
+ */
+
+struct drm_vmw_fifo_debug_arg {
+       uint64_t debug_buffer;
+       uint32_t debug_buffer_size;
+       uint32_t used_size;
+       int32_t did_not_fit;
+       uint32_t pad64;
+};
+
+struct drm_vmw_fence_wait_arg {
+       uint64_t sequence;
+       uint64_t kernel_cookie;
+       int32_t cookie_valid;
+       int32_t pad64;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_CONTROL_STREAM - Control overlays, aka streams.
+ *
+ * This IOCTL controls the overlay units of the svga device.
+ * The SVGA overlay units does not work like regular hardware units in
+ * that they do not automaticaly read back the contents of the given dma
+ * buffer. But instead only read back for each call to this ioctl, and
+ * at any point between this call being made and a following call that
+ * either changes the buffer or disables the stream.
+ */
+
+/**
+ * struct drm_vmw_rect
+ *
+ * Defines a rectangle. Used in the overlay ioctl to define
+ * source and destination rectangle.
+ */
+
+struct drm_vmw_rect {
+       int32_t x;
+       int32_t y;
+       uint32_t w;
+       uint32_t h;
+};
+
+/**
+ * struct drm_vmw_control_stream_arg
+ *
+ * @stream_id: Stearm to control
+ * @enabled: If false all following arguments are ignored.
+ * @handle: Handle to buffer for getting data from.
+ * @format: Format of the overlay as understood by the host.
+ * @width: Width of the overlay.
+ * @height: Height of the overlay.
+ * @size: Size of the overlay in bytes.
+ * @pitch: Array of pitches, the two last are only used for YUV12 formats.
+ * @offset: Offset from start of dma buffer to overlay.
+ * @src: Source rect, must be within the defined area above.
+ * @dst: Destination rect, x and y may be negative.
+ *
+ * Argument to the DRM_VMW_CONTROL_STREAM Ioctl.
+ */
+
+struct drm_vmw_control_stream_arg {
+       uint32_t stream_id;
+       uint32_t enabled;
+
+       uint32_t flags;
+       uint32_t color_key;
+
+       uint32_t handle;
+       uint32_t offset;
+       int32_t format;
+       uint32_t size;
+       uint32_t width;
+       uint32_t height;
+       uint32_t pitch[3];
+
+       uint32_t pad64;
+       struct drm_vmw_rect src;
+       struct drm_vmw_rect dst;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_CURSOR_BYPASS - Give extra information about cursor bypass.
+ *
+ */
+
+#define DRM_VMW_CURSOR_BYPASS_ALL    (1 << 0)
+#define DRM_VMW_CURSOR_BYPASS_FLAGS       (1)
+
+/**
+ * struct drm_vmw_cursor_bypass_arg
+ *
+ * @flags: Flags.
+ * @crtc_id: Crtc id, only used if DMR_CURSOR_BYPASS_ALL isn't passed.
+ * @xpos: X position of cursor.
+ * @ypos: Y position of cursor.
+ * @xhot: X hotspot.
+ * @yhot: Y hotspot.
+ *
+ * Argument to the DRM_VMW_CURSOR_BYPASS Ioctl.
+ */
+
+struct drm_vmw_cursor_bypass_arg {
+       uint32_t flags;
+       uint32_t crtc_id;
+       int32_t xpos;
+       int32_t ypos;
+       int32_t xhot;
+       int32_t yhot;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_CLAIM_STREAM - Claim a single stream.
+ */
+
+/**
+ * struct drm_vmw_context_arg
+ *
+ * @stream_id: Device unique context ID.
+ *
+ * Output argument to the DRM_VMW_CREATE_CONTEXT Ioctl.
+ * Input argument to the DRM_VMW_UNREF_CONTEXT Ioctl.
+ */
+
+struct drm_vmw_stream_arg {
+       uint32_t stream_id;
+       uint32_t pad64;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_UNREF_STREAM - Unclaim a stream.
+ *
+ * Return a single stream that was claimed by this process. Also makes
+ * sure that the stream has been stopped.
+ */
+
+#endif
index 5b76340a5e6ea9a6a374b8353d4f3bb2ee7a2bc0..f3af3a96d8e1b9a9d74d9348f644be247d277c30 100644 (file)
@@ -950,6 +950,7 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo)
                                           MAP_SHARED, bufmgr_gem->fd,
                                           mmap_arg.offset);
                if (bo_gem->gtt_virtual == MAP_FAILED) {
+                       bo_gem->gtt_virtual = NULL;
                        ret = -errno;
                        fprintf(stderr,
                                "%s:%d: Error mapping buffer %d (%s): %s .\n",
index 85fc14f6b82e9976f948e7f29a0a55a5384ef9cc..10cc8a674cf493f4885bf4b478e2c3e49035bf94 100644 (file)
@@ -29,7 +29,6 @@
 #include <assert.h>
 
 #include <sys/mman.h>
-#include <sys/ioctl.h>
 
 #include "nouveau_private.h"
 
@@ -60,7 +59,7 @@ nouveau_bo_info(struct nouveau_bo_priv *nvbo, struct drm_nouveau_gem_info *arg)
 static int
 nouveau_bo_allocated(struct nouveau_bo_priv *nvbo)
 {
-       if (nvbo->sysmem || nvbo->handle || (nvbo->flags & NOUVEAU_BO_PIN))
+       if (nvbo->sysmem || nvbo->handle)
                return 1;
        return 0;
 }
@@ -106,7 +105,7 @@ nouveau_bo_kfree(struct nouveau_bo_priv *nvbo)
 
        req.handle = nvbo->handle;
        nvbo->handle = 0;
-       ioctl(nvdev->fd, DRM_IOCTL_GEM_CLOSE, &req);
+       drmIoctl(nvdev->fd, DRM_IOCTL_GEM_CLOSE, &req);
 }
 
 static int
@@ -117,7 +116,7 @@ nouveau_bo_kalloc(struct nouveau_bo_priv *nvbo, struct nouveau_channel *chan)
        struct drm_nouveau_gem_info *info = &req.info;
        int ret;
 
-       if (nvbo->handle || (nvbo->flags & NOUVEAU_BO_PIN))
+       if (nvbo->handle)
                return 0;
 
        req.channel_hint = chan ? chan->id : 0;
@@ -192,20 +191,24 @@ nouveau_bo_new_tile(struct nouveau_device *dev, uint32_t flags, int align,
        nvbo->base.tile_flags = tile_flags;
 
        nvbo->refcount = 1;
-       /* Don't set NOUVEAU_BO_PIN here, or nouveau_bo_allocated() will
-        * decided the buffer's already allocated when it's not.  The
-        * call to nouveau_bo_pin() later will set this flag.
-        */
-       nvbo->flags = (flags & ~NOUVEAU_BO_PIN);
+       nvbo->flags = flags;
        nvbo->size = size;
        nvbo->align = align;
 
-       if (flags & NOUVEAU_BO_PIN) {
-               ret = nouveau_bo_pin((void *)nvbo, nvbo->flags);
+       if (flags & (NOUVEAU_BO_VRAM | NOUVEAU_BO_GART)) {
+               ret = nouveau_bo_kalloc(nvbo, NULL);
                if (ret) {
                        nouveau_bo_ref(NULL, (void *)nvbo);
                        return ret;
                }
+
+               if (flags & NOUVEAU_BO_PIN) {
+                       ret = nouveau_bo_pin((void *)nvbo, nvbo->flags);
+                       if (ret) {
+                               nouveau_bo_ref(NULL, (void *)nvbo);
+                               return ret;
+                       }
+               }
        }
 
        *bo = &nvbo->base;
@@ -290,7 +293,7 @@ nouveau_bo_handle_get(struct nouveau_bo *bo, uint32_t *handle)
                        return ret;
 
                req.handle = nvbo->handle;
-               ret = ioctl(nvdev->fd, DRM_IOCTL_GEM_FLINK, &req);
+               ret = drmIoctl(nvdev->fd, DRM_IOCTL_GEM_FLINK, &req);
                if (ret) {
                        nouveau_bo_kfree(nvbo);
                        return ret;
@@ -313,7 +316,7 @@ nouveau_bo_handle_ref(struct nouveau_device *dev, uint32_t handle,
        int ret;
 
        req.name = handle;
-       ret = ioctl(nvdev->fd, DRM_IOCTL_GEM_OPEN, &req);
+       ret = drmIoctl(nvdev->fd, DRM_IOCTL_GEM_OPEN, &req);
        if (ret) {
                nouveau_bo_ref(NULL, bo);
                return ret;
@@ -490,25 +493,15 @@ nouveau_bo_pin(struct nouveau_bo *bo, uint32_t flags)
        if (nvbo->pinned)
                return 0;
 
-       /* Ensure we have a kernel object... */
-       if (!nvbo->flags) {
-               if (!(flags & (NOUVEAU_BO_VRAM | NOUVEAU_BO_GART)))
-                       return -EINVAL;
-               nvbo->flags = flags;
-       }
-
-       if (!nvbo->handle) {
-               ret = nouveau_bo_kalloc(nvbo, NULL);
-               if (ret)
-                       return ret;
-       }
+       if (!nvbo->handle)
+               return -EINVAL;
 
        /* Now force it to stay put :) */
        req.handle = nvbo->handle;
        req.domain = 0;
-       if (nvbo->flags & NOUVEAU_BO_VRAM)
+       if (flags & NOUVEAU_BO_VRAM)
                req.domain |= NOUVEAU_GEM_DOMAIN_VRAM;
-       if (nvbo->flags & NOUVEAU_BO_GART)
+       if (flags & NOUVEAU_BO_GART)
                req.domain |= NOUVEAU_GEM_DOMAIN_GART;
 
        ret = drmCommandWriteRead(nvdev->fd, DRM_NOUVEAU_GEM_PIN, &req,
@@ -518,7 +511,6 @@ nouveau_bo_pin(struct nouveau_bo *bo, uint32_t flags)
        nvbo->offset = req.offset;
        nvbo->domain = req.domain;
        nvbo->pinned = 1;
-       nvbo->flags |= NOUVEAU_BO_PIN;
 
        /* Fill in public nouveau_bo members */
        if (nvbo->domain & NOUVEAU_GEM_DOMAIN_VRAM)
index 674c5c37a55fde7bb258ae5286cc1a47471dfce3..638aee30c91e991b6f8647b14f9e7b5275fd3c72 100644 (file)
@@ -111,6 +111,7 @@ nouveau_channel_free(struct nouveau_channel **chan)
 
        FIRE_RING(&nvchan->base);
 
+       nouveau_pushbuf_fini(&nvchan->base);
        nouveau_bo_unmap(nvchan->notifier_bo);
        nouveau_bo_ref(NULL, &nvchan->notifier_bo);
 
index 0b8a6f0198750bd49a7a66d41c18dced7b2ba6e5..91d692a329e2e652c6351d47e6c0e53633bfcfde 100644 (file)
@@ -610,9 +610,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define  NV04_MEMORY_TO_MEMORY_FORMAT_LINE_COUNT                                       0x00000320
 #define  NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT                                           0x00000324
 #define   NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_INPUT_INC_SHIFT                          0
-#define   NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_INPUT_INC_MASK                           0x0000000f
+#define   NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_INPUT_INC_MASK                           0x000000ff
 #define   NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_OUTPUT_INC_SHIFT                         8
-#define   NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_OUTPUT_INC_MASK                          0x00000f00
+#define   NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_OUTPUT_INC_MASK                          0x0000ff00
 #define  NV04_MEMORY_TO_MEMORY_FORMAT_BUF_NOTIFY                                       0x00000328
 
 
@@ -852,99 +852,99 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define  NV03_VIDEO_LUT_CURSOR_DAC_SET_PIXEL_CLOCK                                     0x000003a0
 
 
-#define NV03_DX3_TEXTURED_TRIANGLE                                                     0x00000048
-
-#define  NV03_DX3_TEXTURED_TRIANGLE_NOP                                                        0x00000100
-#define  NV03_DX3_TEXTURED_TRIANGLE_NOTIFY                                             0x00000104
-#define  NV03_DX3_TEXTURED_TRIANGLE_PATCH                                              0x0000010c
-#define  NV03_DX3_TEXTURED_TRIANGLE_DMA_NOTIFY                                         0x00000180
-#define  NV03_DX3_TEXTURED_TRIANGLE_DMA_TEXTURE                                                0x00000184
-#define  NV03_DX3_TEXTURED_TRIANGLE_CLIP_RECTANGLE                                     0x00000188
-#define  NV03_DX3_TEXTURED_TRIANGLE_SURFACE                                            0x0000018c
-#define  NV03_DX3_TEXTURED_TRIANGLE_TEXTURE_OFFSET                                     0x00000304
-#define  NV03_DX3_TEXTURED_TRIANGLE_TEXTURE_FORMAT                                     0x00000308
-#define   NV03_DX3_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_KEY_MASK_SHIFT               0
-#define   NV03_DX3_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_KEY_MASK_MASK                        0x0000ffff
-#define   NV03_DX3_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_KEY_ENABLE_SHIFT             16
-#define   NV03_DX3_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_KEY_ENABLE_MASK              0x000f0000
-#define   NV03_DX3_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_SHIFT                                20
-#define   NV03_DX3_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_MASK                         0x00f00000
-#define   NV03_DX3_TEXTURED_TRIANGLE_TEXTURE_FORMAT_SIZE_MIN_SHIFT                     24
-#define   NV03_DX3_TEXTURED_TRIANGLE_TEXTURE_FORMAT_SIZE_MIN_MASK                      0x0f000000
-#define   NV03_DX3_TEXTURED_TRIANGLE_TEXTURE_FORMAT_SIZE_MAX_SHIFT                     28
-#define   NV03_DX3_TEXTURED_TRIANGLE_TEXTURE_FORMAT_SIZE_MAX_MASK                      0xf0000000
-#define  NV03_DX3_TEXTURED_TRIANGLE_FILTER                                             0x0000030c
-#define   NV03_DX3_TEXTURED_TRIANGLE_FILTER_SPREAD_X_SHIFT                             0
-#define   NV03_DX3_TEXTURED_TRIANGLE_FILTER_SPREAD_X_MASK                              0x0000001f
-#define   NV03_DX3_TEXTURED_TRIANGLE_FILTER_SPREAD_Y_SHIFT                             8
-#define   NV03_DX3_TEXTURED_TRIANGLE_FILTER_SPREAD_Y_MASK                              0x00001f00
-#define   NV03_DX3_TEXTURED_TRIANGLE_FILTER_SIZE_ADJUST_SHIFT                          16
-#define   NV03_DX3_TEXTURED_TRIANGLE_FILTER_SIZE_ADJUST_MASK                           0x00ff0000
-#define  NV03_DX3_TEXTURED_TRIANGLE_FOG_COLOR                                          0x00000310
-#define   NV03_DX3_TEXTURED_TRIANGLE_FOG_COLOR_B_SHIFT                                 0
-#define   NV03_DX3_TEXTURED_TRIANGLE_FOG_COLOR_B_MASK                                  0x000000ff
-#define   NV03_DX3_TEXTURED_TRIANGLE_FOG_COLOR_G_SHIFT                                 8
-#define   NV03_DX3_TEXTURED_TRIANGLE_FOG_COLOR_G_MASK                                  0x0000ff00
-#define   NV03_DX3_TEXTURED_TRIANGLE_FOG_COLOR_R_SHIFT                                 16
-#define   NV03_DX3_TEXTURED_TRIANGLE_FOG_COLOR_R_MASK                                  0x00ff0000
-#define  NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT                                                0x00000314
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_INTERPOLATOR_SHIFT                    0
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_INTERPOLATOR_MASK                     0x0000000f
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_WRAP_U_SHIFT                          4
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_WRAP_U_MASK                           0x00000030
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_WRAP_V_SHIFT                          6
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_WRAP_V_MASK                           0x000000c0
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_SOURCE_COLOR_SHIFT                    8
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_SOURCE_COLOR_MASK                     0x00000f00
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_CULLING_SHIFT                         12
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_CULLING_MASK                          0x00007000
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_Z_PERSPECTIVE_ENABLE                  (1 << 15)
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_Z_FUNC_SHIFT                          16
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_Z_FUNC_MASK                           0x000f0000
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_Z_WRITE_ENABLE_SHIFT                  20
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_Z_WRITE_ENABLE_MASK                   0x00f00000
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_COLOR_WRITE_ENABLE_SHIFT              24
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_COLOR_WRITE_ENABLE_MASK               0x07000000
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_ROP_SHIFT                             27
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_ROP_MASK                              0x18000000
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_BETA                                  (1 << 29)
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_DST_BLEND                             (1 << 30)
-#define   NV03_DX3_TEXTURED_TRIANGLE_CONTROL_OUT_SRC_BLEND                             (1 << 31)
-#define  NV03_DX3_TEXTURED_TRIANGLE_ALPHA_CONTROL                                      0x00000318
-#define   NV03_DX3_TEXTURED_TRIANGLE_ALPHA_CONTROL_ALPHA_REF_SHIFT                     0
-#define   NV03_DX3_TEXTURED_TRIANGLE_ALPHA_CONTROL_ALPHA_REF_MASK                      0x000000ff
-#define   NV03_DX3_TEXTURED_TRIANGLE_ALPHA_CONTROL_ALPHA_FUNC_SHIFT                    8
-#define   NV03_DX3_TEXTURED_TRIANGLE_ALPHA_CONTROL_ALPHA_FUNC_MASK                     0xffffff00
-#define  NV03_DX3_TEXTURED_TRIANGLE_SPECULAR(x)                                                (0x00001000+((x)*32))
-#define  NV03_DX3_TEXTURED_TRIANGLE_SPECULAR__SIZE                                     0x00000040
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_I0_SHIFT                                 0
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_I0_MASK                                  0x0000000f
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_I1_SHIFT                                 4
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_I1_MASK                                  0x000000f0
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_I2_SHIFT                                 8
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_I2_MASK                                  0x00000f00
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_I3_SHIFT                                 12
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_I3_MASK                                  0x0000f000
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_I4_SHIFT                                 16
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_I4_MASK                                  0x000f0000
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_I5_SHIFT                                 20
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_I5_MASK                                  0x00f00000
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_FOG_SHIFT                                        24
-#define   NV03_DX3_TEXTURED_TRIANGLE_SPECULAR_FOG_MASK                                 0xff000000
-#define  NV03_DX3_TEXTURED_TRIANGLE_COLOR(x)                                           (0x00001004+((x)*32))
-#define  NV03_DX3_TEXTURED_TRIANGLE_COLOR__SIZE                                                0x00000040
-#define  NV03_DX3_TEXTURED_TRIANGLE_X(x)                                               (0x00001008+((x)*32))
-#define  NV03_DX3_TEXTURED_TRIANGLE_X__SIZE                                            0x00000040
-#define  NV03_DX3_TEXTURED_TRIANGLE_Y(x)                                               (0x0000100c+((x)*32))
-#define  NV03_DX3_TEXTURED_TRIANGLE_Y__SIZE                                            0x00000040
-#define  NV03_DX3_TEXTURED_TRIANGLE_Z(x)                                               (0x00001010+((x)*32))
-#define  NV03_DX3_TEXTURED_TRIANGLE_Z__SIZE                                            0x00000040
-#define  NV03_DX3_TEXTURED_TRIANGLE_M(x)                                               (0x00001014+((x)*32))
-#define  NV03_DX3_TEXTURED_TRIANGLE_M__SIZE                                            0x00000040
-#define  NV03_DX3_TEXTURED_TRIANGLE_U(x)                                               (0x00001018+((x)*32))
-#define  NV03_DX3_TEXTURED_TRIANGLE_U__SIZE                                            0x00000040
-#define  NV03_DX3_TEXTURED_TRIANGLE_V(x)                                               (0x0000101c+((x)*32))
-#define  NV03_DX3_TEXTURED_TRIANGLE_V__SIZE                                            0x00000040
+#define NV03_TEXTURED_TRIANGLE                                                         0x00000048
+
+#define  NV03_TEXTURED_TRIANGLE_NOP                                                    0x00000100
+#define  NV03_TEXTURED_TRIANGLE_NOTIFY                                                 0x00000104
+#define  NV03_TEXTURED_TRIANGLE_PATCH                                                  0x0000010c
+#define  NV03_TEXTURED_TRIANGLE_DMA_NOTIFY                                             0x00000180
+#define  NV03_TEXTURED_TRIANGLE_DMA_TEXTURE                                            0x00000184
+#define  NV03_TEXTURED_TRIANGLE_CLIP_RECTANGLE                                         0x00000188
+#define  NV03_TEXTURED_TRIANGLE_SURFACE                                                        0x0000018c
+#define  NV03_TEXTURED_TRIANGLE_TEXTURE_OFFSET                                         0x00000304
+#define  NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT                                         0x00000308
+#define   NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_KEY_MASK_SHIFT                   0
+#define   NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_KEY_MASK_MASK                    0x0000ffff
+#define   NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_KEY_ENABLE_SHIFT                 16
+#define   NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_KEY_ENABLE_MASK                  0x000f0000
+#define   NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_SHIFT                            20
+#define   NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_MASK                             0x00f00000
+#define   NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_SIZE_MIN_SHIFT                         24
+#define   NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_SIZE_MIN_MASK                          0x0f000000
+#define   NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_SIZE_MAX_SHIFT                         28
+#define   NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_SIZE_MAX_MASK                          0xf0000000
+#define  NV03_TEXTURED_TRIANGLE_FILTER                                                 0x0000030c
+#define   NV03_TEXTURED_TRIANGLE_FILTER_SPREAD_X_SHIFT                                 0
+#define   NV03_TEXTURED_TRIANGLE_FILTER_SPREAD_X_MASK                                  0x0000001f
+#define   NV03_TEXTURED_TRIANGLE_FILTER_SPREAD_Y_SHIFT                                 8
+#define   NV03_TEXTURED_TRIANGLE_FILTER_SPREAD_Y_MASK                                  0x00001f00
+#define   NV03_TEXTURED_TRIANGLE_FILTER_SIZE_ADJUST_SHIFT                              16
+#define   NV03_TEXTURED_TRIANGLE_FILTER_SIZE_ADJUST_MASK                               0x00ff0000
+#define  NV03_TEXTURED_TRIANGLE_FOG_COLOR                                              0x00000310
+#define   NV03_TEXTURED_TRIANGLE_FOG_COLOR_B_SHIFT                                     0
+#define   NV03_TEXTURED_TRIANGLE_FOG_COLOR_B_MASK                                      0x000000ff
+#define   NV03_TEXTURED_TRIANGLE_FOG_COLOR_G_SHIFT                                     8
+#define   NV03_TEXTURED_TRIANGLE_FOG_COLOR_G_MASK                                      0x0000ff00
+#define   NV03_TEXTURED_TRIANGLE_FOG_COLOR_R_SHIFT                                     16
+#define   NV03_TEXTURED_TRIANGLE_FOG_COLOR_R_MASK                                      0x00ff0000
+#define  NV03_TEXTURED_TRIANGLE_CONTROL_OUT                                            0x00000314
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_INTERPOLATOR_SHIFT                                0
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_INTERPOLATOR_MASK                         0x0000000f
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_WRAP_U_SHIFT                              4
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_WRAP_U_MASK                               0x00000030
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_WRAP_V_SHIFT                              6
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_WRAP_V_MASK                               0x000000c0
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_SOURCE_COLOR_SHIFT                                8
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_SOURCE_COLOR_MASK                         0x00000f00
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_CULLING_SHIFT                             12
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_CULLING_MASK                              0x00007000
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_Z_PERSPECTIVE_ENABLE                      (1 << 15)
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_Z_FUNC_SHIFT                              16
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_Z_FUNC_MASK                               0x000f0000
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_Z_WRITE_ENABLE_SHIFT                      20
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_Z_WRITE_ENABLE_MASK                       0x00f00000
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_COLOR_WRITE_ENABLE_SHIFT                  24
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_COLOR_WRITE_ENABLE_MASK                   0x07000000
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_ROP_SHIFT                                 27
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_ROP_MASK                                  0x18000000
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_BETA                                      (1 << 29)
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_DST_BLEND                                 (1 << 30)
+#define   NV03_TEXTURED_TRIANGLE_CONTROL_OUT_SRC_BLEND                                 (1 << 31)
+#define  NV03_TEXTURED_TRIANGLE_ALPHA_CONTROL                                          0x00000318
+#define   NV03_TEXTURED_TRIANGLE_ALPHA_CONTROL_ALPHA_REF_SHIFT                         0
+#define   NV03_TEXTURED_TRIANGLE_ALPHA_CONTROL_ALPHA_REF_MASK                          0x000000ff
+#define   NV03_TEXTURED_TRIANGLE_ALPHA_CONTROL_ALPHA_FUNC_SHIFT                                8
+#define   NV03_TEXTURED_TRIANGLE_ALPHA_CONTROL_ALPHA_FUNC_MASK                         0xffffff00
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR(x)                                   (0x00001000+((x)*32))
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR__SIZE                                        0x00000080
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I0_SHIFT                            0
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I0_MASK                             0x0000000f
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I1_SHIFT                            4
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I1_MASK                             0x000000f0
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I2_SHIFT                            8
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I2_MASK                             0x00000f00
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I3_SHIFT                            12
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I3_MASK                             0x0000f000
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I4_SHIFT                            16
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I4_MASK                             0x000f0000
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I5_SHIFT                            20
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I5_MASK                             0x00f00000
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_FOG_SHIFT                           24
+#define   NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_FOG_MASK                            0xff000000
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_COLOR(x)                                      (0x00001004+((x)*32))
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_COLOR__SIZE                                   0x00000080
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_SX(x)                                         (0x00001008+((x)*32))
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_SX__SIZE                                      0x00000080
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_SY(x)                                         (0x0000100c+((x)*32))
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_SY__SIZE                                      0x00000080
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_SZ(x)                                         (0x00001010+((x)*32))
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_SZ__SIZE                                      0x00000080
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_RHW(x)                                                (0x00001014+((x)*32))
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_RHW__SIZE                                     0x00000080
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_TU(x)                                         (0x00001018+((x)*32))
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_TU__SIZE                                      0x00000080
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_TV(x)                                         (0x0000101c+((x)*32))
+#define  NV03_TEXTURED_TRIANGLE_TLVERTEX_TV__SIZE                                      0x00000080
 
 
 #define NV04_GDI_RECTANGLE_TEXT                                                                0x0000004a
@@ -1315,429 +1315,450 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define  NV04_CONTEXT_SURFACES_3D_OFFSET_ZETA                                          0x00000310
 
 
-#define NV04_DX5_TEXTURED_TRIANGLE                                                     0x00000054
-
-#define  NV04_DX5_TEXTURED_TRIANGLE_NOP                                                        0x00000100
-#define  NV04_DX5_TEXTURED_TRIANGLE_NOTIFY                                             0x00000104
-#define  NV04_DX5_TEXTURED_TRIANGLE_DMA_NOTIFY                                         0x00000180
-#define  NV04_DX5_TEXTURED_TRIANGLE_DMA_A                                              0x00000184
-#define  NV04_DX5_TEXTURED_TRIANGLE_DMA_B                                              0x00000188
-#define  NV04_DX5_TEXTURED_TRIANGLE_SURFACE                                            0x0000018c
-#define  NV04_DX5_TEXTURED_TRIANGLE_COLORKEY                                           0x00000300
-#define  NV04_DX5_TEXTURED_TRIANGLE_OFFSET                                             0x00000304
-#define  NV04_DX5_TEXTURED_TRIANGLE_FORMAT                                             0x00000308
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_DMA_SHIFT                                  0
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_DMA_MASK                                   0x00000003
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_COLOR_KEY_MATCH_SHIFT                      2
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_COLOR_KEY_MATCH_MASK                       0x0000000c
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_SHIFT                           4
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_MASK                            0x00000030
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_CENTER                         0x00000010
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_CORNER                         0x00000020
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_SHIFT                           6
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_MASK                            0x000000c0
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_CENTER                         0x00000040
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_CORNER                         0x00000080
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_COLOR_SHIFT                                        8
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_COLOR_MASK                                 0x00000f00
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_COLOR_Y8                                  0x00000100
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_COLOR_A1R5G5B5                            0x00000200
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_COLOR_X1R5G5B5                            0x00000300
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_COLOR_A4R4G4B4                            0x00000400
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_COLOR_R5G6B5                              0x00000500
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_COLOR_A8R8G8B8                            0x00000600
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_COLOR_X8R8G8B8                            0x00000700
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_MIPMAP_LEVELS_SHIFT                                12
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_MIPMAP_LEVELS_MASK                         0x0000f000
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_U_SHIFT                          16
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_U_MASK                           0x000f0000
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_V_SHIFT                          20
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_V_MASK                           0x00f00000
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_SHIFT                             24
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_MASK                              0x07000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_REPEAT                           0x01000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_MIRRORED_REPEAT                  0x02000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_CLAMP_TO_EDGE                    0x03000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_CLAMP_TO_BORDER                  0x04000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_CLAMP                            0x05000000
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_WRAPU                                      (1 << 27)
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_SHIFT                             28
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_MASK                              0x70000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_REPEAT                           0x10000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_MIRRORED_REPEAT                  0x20000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_CLAMP_TO_EDGE                    0x30000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_CLAMP_TO_BORDER                  0x40000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_CLAMP                            0x50000000
-#define   NV04_DX5_TEXTURED_TRIANGLE_FORMAT_WRAPV                                      (1 << 31)
-#define  NV04_DX5_TEXTURED_TRIANGLE_FILTER                                             0x0000030c
-#define   NV04_DX5_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_X_SHIFT                                0
-#define   NV04_DX5_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_X_MASK                         0x000000ff
-#define   NV04_DX5_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_Y_SHIFT                                8
-#define   NV04_DX5_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_Y_MASK                         0x00007f00
-#define   NV04_DX5_TEXTURED_TRIANGLE_FILTER_MIPMAP_DITHER_ENABLE                       (1 << 15)
-#define   NV04_DX5_TEXTURED_TRIANGLE_FILTER_MIPMAP_LODBIAS_SHIFT                       16
-#define   NV04_DX5_TEXTURED_TRIANGLE_FILTER_MIPMAP_LODBIAS_MASK                                0x00ff0000
-#define   NV04_DX5_TEXTURED_TRIANGLE_FILTER_MINIFY_SHIFT                               24
-#define   NV04_DX5_TEXTURED_TRIANGLE_FILTER_MINIFY_MASK                                        0x07000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FILTER_MINIFY_NEAREST                            0x01000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FILTER_MINIFY_LINEAR                             0x02000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FILTER_MINIFY_NEAREST_MIPMAP_NEAREST             0x03000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FILTER_MINIFY_LINEAR_MIPMAP_NEAREST              0x04000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FILTER_MINIFY_NEAREST_MIPMAP_LINEAR              0x05000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FILTER_MINIFY_LINEAR_MIPMAP_LINEAR               0x06000000
-#define   NV04_DX5_TEXTURED_TRIANGLE_FILTER_ANISOTROPIC_MINIFY_ENABLE                  (1 << 27)
-#define   NV04_DX5_TEXTURED_TRIANGLE_FILTER_MAGNIFY_SHIFT                              28
-#define   NV04_DX5_TEXTURED_TRIANGLE_FILTER_MAGNIFY_MASK                               0x70000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FILTER_MAGNIFY_NEAREST                           0x10000000
-#define    NV04_DX5_TEXTURED_TRIANGLE_FILTER_MAGNIFY_LINEAR                            0x20000000
-#define   NV04_DX5_TEXTURED_TRIANGLE_FILTER_ANISOTROPIC_MAGNIFY_ENABLE                 (1 << 31)
-#define  NV04_DX5_TEXTURED_TRIANGLE_BLEND                                              0x00000310
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_SHIFT                           0
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_MASK                            0x0000000f
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_MASK_BIT_SHIFT                              4
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_MASK_BIT_MASK                               0x00000030
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_SHIFT                            6
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_MASK                             0x000000c0
-#define    NV04_DX5_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_FLAT                            0x00000040
-#define    NV04_DX5_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_GOURAUD                         0x00000080
-#define    NV04_DX5_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_PHONG                           0x000000c0
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE_SHIFT            8
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE_MASK             0x00000f00
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_SPECULAR_ENABLE_SHIFT                       12
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_SPECULAR_ENABLE_MASK                                0x0000f000
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_FOG_ENABLE_SHIFT                            16
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_FOG_ENABLE_MASK                             0x000f0000
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_ALPHA_ENABLE_SHIFT                          20
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_ALPHA_ENABLE_MASK                           0x00f00000
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_SRC_SHIFT                                   24
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_SRC_MASK                                    0x0f000000
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_DST_SHIFT                                   28
-#define   NV04_DX5_TEXTURED_TRIANGLE_BLEND_DST_MASK                                    0xf0000000
-#define  NV04_DX5_TEXTURED_TRIANGLE_CONTROL                                            0x00000314
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_ALPHA_REF_SHIFT                           0
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_ALPHA_REF_MASK                            0x000000ff
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_SHIFT                          8
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_MASK                           0x00000f00
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_ALPHA_TEST_ENABLE                         (1 << 12)
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_ORIGIN                                    (1 << 13)
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_Z_ENABLE_SHIFT                            14
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_Z_ENABLE_MASK                             0x0000c000
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_SHIFT                              16
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_MASK                               0x000f0000
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_SHIFT                           20
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_MASK                            0x00300000
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_DITHER_ENABLE                             (1 << 22)
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_Z_PERSPECTIVE_ENABLE                      (1 << 23)
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_Z_WRITE_ENABLE_SHIFT                      24
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_Z_WRITE_ENABLE_MASK                       0x3f000000
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_Z_FORMAT_SHIFT                            30
-#define   NV04_DX5_TEXTURED_TRIANGLE_CONTROL_Z_FORMAT_MASK                             0xc0000000
-#define  NV04_DX5_TEXTURED_TRIANGLE_FOGCOLOR                                           0x00000318
-#define   NV04_DX5_TEXTURED_TRIANGLE_FOGCOLOR_B_SHIFT                                  0
-#define   NV04_DX5_TEXTURED_TRIANGLE_FOGCOLOR_B_MASK                                   0x000000ff
-#define   NV04_DX5_TEXTURED_TRIANGLE_FOGCOLOR_G_SHIFT                                  8
-#define   NV04_DX5_TEXTURED_TRIANGLE_FOGCOLOR_G_MASK                                   0x0000ff00
-#define   NV04_DX5_TEXTURED_TRIANGLE_FOGCOLOR_R_SHIFT                                  16
-#define   NV04_DX5_TEXTURED_TRIANGLE_FOGCOLOR_R_MASK                                   0x00ff0000
-#define   NV04_DX5_TEXTURED_TRIANGLE_FOGCOLOR_A_SHIFT                                  24
-#define   NV04_DX5_TEXTURED_TRIANGLE_FOGCOLOR_A_MASK                                   0xff000000
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SX(x)                                     (0x00000400+((x)*32))
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SX__SIZE                                  0x00000010
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SY(x)                                     (0x00000404+((x)*32))
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SY__SIZE                                  0x00000010
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SZ(x)                                     (0x00000408+((x)*32))
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SZ__SIZE                                  0x00000010
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_RHW(x)                                    (0x0000040c+((x)*32))
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_RHW__SIZE                                 0x00000010
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_COLOR(x)                                  (0x00000410+((x)*32))
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_COLOR__SIZE                               0x00000010
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_COLOR_B_SHIFT                            0
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_COLOR_B_MASK                             0x000000ff
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_COLOR_G_SHIFT                            8
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_COLOR_G_MASK                             0x0000ff00
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_COLOR_R_SHIFT                            16
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_COLOR_R_MASK                             0x00ff0000
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_COLOR_A_SHIFT                            24
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_COLOR_A_MASK                             0xff000000
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR(x)                               (0x00000414+((x)*32))
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR__SIZE                            0x00000010
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_B_SHIFT                         0
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_B_MASK                          0x000000ff
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_G_SHIFT                         8
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_G_MASK                          0x0000ff00
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_R_SHIFT                         16
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_R_MASK                          0x00ff0000
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_FOG_SHIFT                       24
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_FOG_MASK                                0xff000000
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_TU(x)                                     (0x00000418+((x)*32))
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_TU__SIZE                                  0x00000010
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_TV(x)                                     (0x0000041c+((x)*32))
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_TV__SIZE                                  0x00000010
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE(x)                          (0x00000600+((x)*4))
-#define  NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE__SIZE                       0x00000040
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I0_SHIFT                   0
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I0_MASK                    0x0000000f
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I1_SHIFT                   4
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I1_MASK                    0x000000f0
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I2_SHIFT                   8
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I2_MASK                    0x00000f00
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I3_SHIFT                   12
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I3_MASK                    0x0000f000
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I4_SHIFT                   16
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I4_MASK                    0x000f0000
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I5_SHIFT                   20
-#define   NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I5_MASK                    0x00f00000
-
-
-#define NV04_DX6_MULTITEX_TRIANGLE                                                     0x00000055
-
-#define  NV04_DX6_MULTITEX_TRIANGLE_NOP                                                        0x00000100
-#define  NV04_DX6_MULTITEX_TRIANGLE_NOTIFY                                             0x00000104
-#define  NV04_DX6_MULTITEX_TRIANGLE_DMA_NOTIFY                                         0x00000180
-#define  NV04_DX6_MULTITEX_TRIANGLE_DMA_A                                              0x00000184
-#define  NV04_DX6_MULTITEX_TRIANGLE_DMA_B                                              0x00000188
-#define  NV04_DX6_MULTITEX_TRIANGLE_SURFACE                                            0x0000018c
-#define  NV04_DX6_MULTITEX_TRIANGLE_OFFSET(x)                                          (0x00000308+((x)*4))
-#define  NV04_DX6_MULTITEX_TRIANGLE_OFFSET__SIZE                                       0x00000002
-#define  NV04_DX6_MULTITEX_TRIANGLE_FORMAT(x)                                          (0x00000310+((x)*4))
-#define  NV04_DX6_MULTITEX_TRIANGLE_FORMAT__SIZE                                       0x00000002
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_DMA_SHIFT                                  0
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_DMA_MASK                                   0x0000000f
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_ORIGIN_ZOH_SHIFT                           4
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_ORIGIN_ZOH_MASK                            0x00000030
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_ORIGIN_FOH_SHIFT                           6
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_ORIGIN_FOH_MASK                            0x000000c0
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_COLOR_SHIFT                                        8
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_COLOR_MASK                                 0x00000f00
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_MIPMAP_LEVELS_SHIFT                                12
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_MIPMAP_LEVELS_MASK                         0x0000f000
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_U_SHIFT                          16
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_U_MASK                           0x000f0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_V_SHIFT                          20
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_V_MASK                           0x00f00000
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_ADDRESSU_SHIFT                             24
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_ADDRESSU_MASK                              0x07000000
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_WRAPU                                      (1 << 27)
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_ADDRESSV_SHIFT                             28
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_ADDRESSV_MASK                              0x70000000
-#define   NV04_DX6_MULTITEX_TRIANGLE_FORMAT_WRAPV                                      (1 << 31)
-#define  NV04_DX6_MULTITEX_TRIANGLE_FILTER(x)                                          (0x00000318+((x)*4))
-#define  NV04_DX6_MULTITEX_TRIANGLE_FILTER__SIZE                                       0x00000002
-#define   NV04_DX6_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_X_SHIFT                                0
-#define   NV04_DX6_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_X_MASK                         0x000000ff
-#define   NV04_DX6_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_Y_SHIFT                                8
-#define   NV04_DX6_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_Y_MASK                         0x00007f00
-#define   NV04_DX6_MULTITEX_TRIANGLE_FILTER_MIPMAP_DITHER_ENABLE                       (1 << 15)
-#define   NV04_DX6_MULTITEX_TRIANGLE_FILTER_MIPMAP_LODBIAS_SHIFT                       16
-#define   NV04_DX6_MULTITEX_TRIANGLE_FILTER_MIPMAP_LODBIAS_MASK                                0x00ff0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_FILTER_MINIFY_SHIFT                               24
-#define   NV04_DX6_MULTITEX_TRIANGLE_FILTER_MINIFY_MASK                                        0x07000000
-#define   NV04_DX6_MULTITEX_TRIANGLE_FILTER_ANISOTROPIC_MINIFY_ENABLE                  (1 << 27)
-#define   NV04_DX6_MULTITEX_TRIANGLE_FILTER_MAGNIFY_SHIFT                              28
-#define   NV04_DX6_MULTITEX_TRIANGLE_FILTER_MAGNIFY_MASK                               0x70000000
-#define   NV04_DX6_MULTITEX_TRIANGLE_FILTER_ANISOTROPIC_MAGNIFY_ENABLE                 (1 << 31)
-#define  NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA                                    0x00000320
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_INVERSE0                          (1 <<  0)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ALPHA0                            (1 <<  1)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT0_SHIFT                   2
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT0_MASK                    0x000000fc
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_INVERSE1                          (1 <<  8)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ALPHA1                            (1 <<  9)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT1_SHIFT                   10
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT1_MASK                    0x0000fc00
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_INVERSE2                          (1 << 16)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ALPHA2                            (1 << 17)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT2_SHIFT                   18
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT2_MASK                    0x00fc0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_INVERSE3                          (1 << 24)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ALPHA3                            (1 << 25)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT3_SHIFT                   26
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT3_MASK                    0x1c000000
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_OPERATION_SHIFT                   29
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_OPERATION_MASK                    0xe0000000
-#define  NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR                                    0x00000324
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_INVERSE0                          (1 <<  0)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ALPHA0                            (1 <<  1)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT0_SHIFT                   2
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT0_MASK                    0x000000fc
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_INVERSE1                          (1 <<  8)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ALPHA1                            (1 <<  9)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT1_SHIFT                   10
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT1_MASK                    0x0000fc00
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_INVERSE2                          (1 << 16)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ALPHA2                            (1 << 17)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT2_SHIFT                   18
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT2_MASK                    0x00fc0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_INVERSE3                          (1 << 24)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ALPHA3                            (1 << 25)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT3_SHIFT                   26
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT3_MASK                    0x1c000000
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_OPERATION_SHIFT                   29
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR_OPERATION_MASK                    0xe0000000
-#define  NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA                                    0x0000032c
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_INVERSE0                          (1 <<  0)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ALPHA0                            (1 <<  1)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT0_SHIFT                   2
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT0_MASK                    0x000000fc
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_INVERSE1                          (1 <<  8)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ALPHA1                            (1 <<  9)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT1_SHIFT                   10
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT1_MASK                    0x0000fc00
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_INVERSE2                          (1 << 16)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ALPHA2                            (1 << 17)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT2_SHIFT                   18
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT2_MASK                    0x00fc0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_INVERSE3                          (1 << 24)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ALPHA3                            (1 << 25)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT3_SHIFT                   26
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT3_MASK                    0x1c000000
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_OPERATION_SHIFT                   29
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_OPERATION_MASK                    0xe0000000
-#define  NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR                                    0x00000330
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_INVERSE0                          (1 <<  0)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ALPHA0                            (1 <<  1)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT0_SHIFT                   2
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT0_MASK                    0x000000fc
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_INVERSE1                          (1 <<  8)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ALPHA1                            (1 <<  9)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT1_SHIFT                   10
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT1_MASK                    0x0000fc00
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_INVERSE2                          (1 << 16)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ALPHA2                            (1 << 17)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT2_SHIFT                   18
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT2_MASK                    0x00fc0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_INVERSE3                          (1 << 24)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ALPHA3                            (1 << 25)
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT3_SHIFT                   26
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT3_MASK                    0x1c000000
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_OPERATION_SHIFT                   29
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR_OPERATION_MASK                    0xe0000000
-#define  NV04_DX6_MULTITEX_TRIANGLE_COMBINE_FACTOR                                     0x00000334
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_FACTOR_B_SHIFT                            0
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_FACTOR_B_MASK                             0x000000ff
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_FACTOR_G_SHIFT                            8
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_FACTOR_G_MASK                             0x0000ff00
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_FACTOR_R_SHIFT                            16
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_FACTOR_R_MASK                             0x00ff0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_FACTOR_A_SHIFT                            24
-#define   NV04_DX6_MULTITEX_TRIANGLE_COMBINE_FACTOR_A_MASK                             0xff000000
-#define  NV04_DX6_MULTITEX_TRIANGLE_BLEND                                              0x00000338
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_MASK_BIT_SHIFT                              4
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_MASK_BIT_MASK                               0x00000030
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_SHIFT                            6
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_MASK                             0x000000c0
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE_SHIFT            8
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE_MASK             0x00000f00
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_SPECULAR_ENABLE_SHIFT                       12
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_SPECULAR_ENABLE_MASK                                0x0000f000
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_FOG_ENABLE_SHIFT                            16
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_FOG_ENABLE_MASK                             0x000f0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_ALPHA_ENABLE_SHIFT                          20
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_ALPHA_ENABLE_MASK                           0x00f00000
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_SRC_SHIFT                                   24
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_SRC_MASK                                    0x0f000000
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_DST_SHIFT                                   28
-#define   NV04_DX6_MULTITEX_TRIANGLE_BLEND_DST_MASK                                    0xf0000000
-#define  NV04_DX6_MULTITEX_TRIANGLE_CONTROL0                                           0x0000033c
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_ALPHA_REF_SHIFT                          0
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_ALPHA_REF_MASK                           0x000000ff
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_SHIFT                         8
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_MASK                          0x00000f00
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_ALPHA_TEST_ENABLE                                (1 << 12)
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_ORIGIN                                   (1 << 13)
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_Z_ENABLE_SHIFT                           14
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_Z_ENABLE_MASK                            0x0000c000
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_SHIFT                             16
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_MASK                              0x000f0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_SHIFT                          20
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_MASK                           0x00300000
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_DITHER_ENABLE                            (1 << 22)
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_Z_PERSPECTIVE_ENABLE                     (1 << 23)
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_Z_WRITE_ENABLE                           (1 << 24)
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_STENCIL_WRITE_ENABLE                     (1 << 25)
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_ALPHA_WRITE_ENABLE                       (1 << 26)
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_RED_WRITE_ENABLE                         (1 << 27)
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_GREEN_WRITE_ENABLE                       (1 << 28)
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_BLUE_WRITE_ENABLE                                (1 << 29)
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_Z_FORMAT_SHIFT                           30
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL0_Z_FORMAT_MASK                            0xc0000000
-#define  NV04_DX6_MULTITEX_TRIANGLE_CONTROL1                                           0x00000340
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL1_STENCIL_TEST_ENABLE_SHIFT                        0
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL1_STENCIL_TEST_ENABLE_MASK                 0x0000000f
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL1_STENCIL_FUNC_SHIFT                       4
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL1_STENCIL_FUNC_MASK                                0x000000f0
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL1_STENCIL_REF_SHIFT                                8
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL1_STENCIL_REF_MASK                         0x0000ff00
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_READ_SHIFT                  16
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_READ_MASK                   0x00ff0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_WRITE_SHIFT                 24
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_WRITE_MASK                  0xff000000
-#define  NV04_DX6_MULTITEX_TRIANGLE_CONTROL2                                           0x00000344
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_FAIL_SHIFT                    0
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_FAIL_MASK                     0x0000000f
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZFAIL_SHIFT                   4
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZFAIL_MASK                    0x000000f0
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZPASS_SHIFT                   8
-#define   NV04_DX6_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZPASS_MASK                    0x00000f00
-#define  NV04_DX6_MULTITEX_TRIANGLE_FOGCOLOR                                           0x00000348
-#define   NV04_DX6_MULTITEX_TRIANGLE_FOGCOLOR_B_SHIFT                                  0
-#define   NV04_DX6_MULTITEX_TRIANGLE_FOGCOLOR_B_MASK                                   0x000000ff
-#define   NV04_DX6_MULTITEX_TRIANGLE_FOGCOLOR_G_SHIFT                                  8
-#define   NV04_DX6_MULTITEX_TRIANGLE_FOGCOLOR_G_MASK                                   0x0000ff00
-#define   NV04_DX6_MULTITEX_TRIANGLE_FOGCOLOR_R_SHIFT                                  16
-#define   NV04_DX6_MULTITEX_TRIANGLE_FOGCOLOR_R_MASK                                   0x00ff0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_FOGCOLOR_A_SHIFT                                  24
-#define   NV04_DX6_MULTITEX_TRIANGLE_FOGCOLOR_A_MASK                                   0xff000000
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SX(x)                                   (0x00000400+((x)*40))
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SX__SIZE                                        0x00000008
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SY(x)                                   (0x00000404+((x)*40))
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SY__SIZE                                        0x00000008
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SZ(x)                                   (0x00000408+((x)*40))
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SZ__SIZE                                        0x00000008
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_RHW(x)                                  (0x0000040c+((x)*40))
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_RHW__SIZE                               0x00000008
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR(x)                                        (0x00000410+((x)*40))
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR__SIZE                             0x00000008
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_B_SHIFT                          0
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_B_MASK                           0x000000ff
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_G_SHIFT                          8
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_G_MASK                           0x0000ff00
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_R_SHIFT                          16
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_R_MASK                           0x00ff0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_A_SHIFT                          24
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_A_MASK                           0xff000000
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR(x)                             (0x00000414+((x)*40))
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR__SIZE                          0x00000008
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_B_SHIFT                       0
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_B_MASK                                0x000000ff
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_G_SHIFT                       8
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_G_MASK                                0x0000ff00
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_R_SHIFT                       16
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_R_MASK                                0x00ff0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_FOG_SHIFT                     24
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_FOG_MASK                      0xff000000
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_TU0(x)                                  (0x00000418+((x)*40))
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_TU0__SIZE                               0x00000008
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_TV0(x)                                  (0x0000041c+((x)*40))
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_TV0__SIZE                               0x00000008
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_TU1(x)                                  (0x00000420+((x)*40))
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_TU1__SIZE                               0x00000008
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_TV1(x)                                  (0x00000424+((x)*40))
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_TV1__SIZE                               0x00000008
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE(x)                                (0x00000540+((x)*4))
-#define  NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE__SIZE                     0x00000030
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I0_SHIFT                 0
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I0_MASK                  0x0000000f
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I1_SHIFT                 4
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I1_MASK                  0x000000f0
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I2_SHIFT                 8
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I2_MASK                  0x00000f00
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I3_SHIFT                 12
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I3_MASK                  0x0000f000
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I4_SHIFT                 16
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I4_MASK                  0x000f0000
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I5_SHIFT                 20
-#define   NV04_DX6_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I5_MASK                  0x00f00000
+#define NV04_TEXTURED_TRIANGLE                                                         0x00000054
+
+#define  NV04_TEXTURED_TRIANGLE_NOP                                                    0x00000100
+#define  NV04_TEXTURED_TRIANGLE_NOTIFY                                                 0x00000104
+#define  NV04_TEXTURED_TRIANGLE_DMA_NOTIFY                                             0x00000180
+#define  NV04_TEXTURED_TRIANGLE_DMA_A                                                  0x00000184
+#define  NV04_TEXTURED_TRIANGLE_DMA_B                                                  0x00000188
+#define  NV04_TEXTURED_TRIANGLE_SURFACE                                                        0x0000018c
+#define  NV04_TEXTURED_TRIANGLE_COLORKEY                                               0x00000300
+#define  NV04_TEXTURED_TRIANGLE_OFFSET                                                 0x00000304
+#define  NV04_TEXTURED_TRIANGLE_FORMAT                                                 0x00000308
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_DMA_A                                          (1 <<  0)
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_DMA_B                                          (1 <<  1)
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_KEY_MATCH_SHIFT                          2
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_KEY_MATCH_MASK                           0x0000000c
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_SHIFT                               4
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_MASK                                        0x00000030
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_CENTER                             0x00000010
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_CORNER                             0x00000020
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_SHIFT                               6
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_MASK                                        0x000000c0
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_CENTER                             0x00000040
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_CORNER                             0x00000080
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_SHIFT                                    8
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_MASK                                     0x00000f00
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_Y8                                      0x00000100
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A1R5G5B5                                        0x00000200
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_X1R5G5B5                                        0x00000300
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A4R4G4B4                                        0x00000400
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_R5G6B5                                  0x00000500
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A8R8G8B8                                        0x00000600
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_X8R8G8B8                                        0x00000700
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_MIPMAP_LEVELS_SHIFT                            12
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_MIPMAP_LEVELS_MASK                             0x0000f000
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_U_SHIFT                              16
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_U_MASK                               0x000f0000
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_V_SHIFT                              20
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_V_MASK                               0x00f00000
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_SHIFT                                 24
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_MASK                                  0x07000000
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_REPEAT                               0x01000000
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_MIRRORED_REPEAT                      0x02000000
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_CLAMP_TO_EDGE                                0x03000000
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_CLAMP_TO_BORDER                      0x04000000
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_CLAMP                                        0x05000000
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_WRAPU                                          (1 << 27)
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_SHIFT                                 28
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_MASK                                  0x70000000
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_REPEAT                               0x10000000
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_MIRRORED_REPEAT                      0x20000000
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_CLAMP_TO_EDGE                                0x30000000
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_CLAMP_TO_BORDER                      0x40000000
+#define    NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_CLAMP                                        0x50000000
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_WRAPV                                          (1 << 31)
+#define  NV04_TEXTURED_TRIANGLE_FILTER                                                 0x0000030c
+#define   NV04_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_X_SHIFT                            0
+#define   NV04_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_X_MASK                             0x000000ff
+#define   NV04_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_Y_SHIFT                            8
+#define   NV04_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_Y_MASK                             0x00007f00
+#define   NV04_TEXTURED_TRIANGLE_FILTER_MIPMAP_DITHER_ENABLE                           (1 << 15)
+#define   NV04_TEXTURED_TRIANGLE_FILTER_MIPMAP_LODBIAS_SHIFT                           16
+#define   NV04_TEXTURED_TRIANGLE_FILTER_MIPMAP_LODBIAS_MASK                            0x00ff0000
+#define   NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_SHIFT                                   24
+#define   NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_MASK                                    0x07000000
+#define    NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_NEAREST                                        0x01000000
+#define    NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_LINEAR                                 0x02000000
+#define    NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_NEAREST_MIPMAP_NEAREST                 0x03000000
+#define    NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_LINEAR_MIPMAP_NEAREST                  0x04000000
+#define    NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_NEAREST_MIPMAP_LINEAR                  0x05000000
+#define    NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_LINEAR_MIPMAP_LINEAR                   0x06000000
+#define   NV04_TEXTURED_TRIANGLE_FILTER_ANISOTROPIC_MINIFY_ENABLE                      (1 << 27)
+#define   NV04_TEXTURED_TRIANGLE_FILTER_MAGNIFY_SHIFT                                  28
+#define   NV04_TEXTURED_TRIANGLE_FILTER_MAGNIFY_MASK                                   0x70000000
+#define    NV04_TEXTURED_TRIANGLE_FILTER_MAGNIFY_NEAREST                               0x10000000
+#define    NV04_TEXTURED_TRIANGLE_FILTER_MAGNIFY_LINEAR                                        0x20000000
+#define   NV04_TEXTURED_TRIANGLE_FILTER_ANISOTROPIC_MAGNIFY_ENABLE                     (1 << 31)
+#define  NV04_TEXTURED_TRIANGLE_BLEND                                                  0x00000310
+#define   NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_SHIFT                               0
+#define   NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_MASK                                        0x0000000f
+#define   NV04_TEXTURED_TRIANGLE_BLEND_MASK_BIT_SHIFT                                  4
+#define   NV04_TEXTURED_TRIANGLE_BLEND_MASK_BIT_MASK                                   0x00000030
+#define   NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_SHIFT                                        6
+#define   NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_MASK                                 0x000000c0
+#define    NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_FLAT                                        0x00000040
+#define    NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_GOURAUD                             0x00000080
+#define    NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_PHONG                               0x000000c0
+#define   NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE                      (1 <<  8)
+#define   NV04_TEXTURED_TRIANGLE_BLEND_SPECULAR_ENABLE_SHIFT                           12
+#define   NV04_TEXTURED_TRIANGLE_BLEND_SPECULAR_ENABLE_MASK                            0x0000f000
+#define   NV04_TEXTURED_TRIANGLE_BLEND_FOG_ENABLE_SHIFT                                        16
+#define   NV04_TEXTURED_TRIANGLE_BLEND_FOG_ENABLE_MASK                                 0x000f0000
+#define   NV04_TEXTURED_TRIANGLE_BLEND_BLEND_ENABLE                                    (1 << 20)
+#define   NV04_TEXTURED_TRIANGLE_BLEND_SRC_SHIFT                                       24
+#define   NV04_TEXTURED_TRIANGLE_BLEND_SRC_MASK                                                0x0f000000
+#define   NV04_TEXTURED_TRIANGLE_BLEND_DST_SHIFT                                       28
+#define   NV04_TEXTURED_TRIANGLE_BLEND_DST_MASK                                                0xf0000000
+#define  NV04_TEXTURED_TRIANGLE_CONTROL                                                        0x00000314
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_REF_SHIFT                               0
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_REF_MASK                                        0x000000ff
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_SHIFT                              8
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_MASK                               0x00000f00
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_ENABLE                                  (1 << 12)
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_ORIGIN                                                (1 << 13)
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_ENABLE                                      (1 << 14)
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_SHIFT                                  16
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_MASK                                   0x000f0000
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_SHIFT                               20
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_MASK                                        0x00300000
+#define    NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_BOTH                               0x00000000
+#define    NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_NONE                               0x00100000
+#define    NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_CW                                 0x00200000
+#define    NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_CCW                                        0x00300000
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_DITHER_ENABLE                                 (1 << 22)
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_PERSPECTIVE_ENABLE                          (1 << 23)
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_WRITE                                       (1 << 24)
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_FORMAT_SHIFT                                        30
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_FORMAT_MASK                                 0xc0000000
+#define  NV04_TEXTURED_TRIANGLE_FOGCOLOR                                               0x00000318
+#define   NV04_TEXTURED_TRIANGLE_FOGCOLOR_B_SHIFT                                      0
+#define   NV04_TEXTURED_TRIANGLE_FOGCOLOR_B_MASK                                       0x000000ff
+#define   NV04_TEXTURED_TRIANGLE_FOGCOLOR_G_SHIFT                                      8
+#define   NV04_TEXTURED_TRIANGLE_FOGCOLOR_G_MASK                                       0x0000ff00
+#define   NV04_TEXTURED_TRIANGLE_FOGCOLOR_R_SHIFT                                      16
+#define   NV04_TEXTURED_TRIANGLE_FOGCOLOR_R_MASK                                       0x00ff0000
+#define   NV04_TEXTURED_TRIANGLE_FOGCOLOR_A_SHIFT                                      24
+#define   NV04_TEXTURED_TRIANGLE_FOGCOLOR_A_MASK                                       0xff000000
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_SX(x)                                         (0x00000400+((x)*32))
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_SX__SIZE                                      0x00000010
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_SY(x)                                         (0x00000404+((x)*32))
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_SY__SIZE                                      0x00000010
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_SZ(x)                                         (0x00000408+((x)*32))
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_SZ__SIZE                                      0x00000010
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_RHW(x)                                                (0x0000040c+((x)*32))
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_RHW__SIZE                                     0x00000010
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR(x)                                      (0x00000410+((x)*32))
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR__SIZE                                   0x00000010
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_B_SHIFT                                        0
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_B_MASK                                 0x000000ff
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_G_SHIFT                                        8
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_G_MASK                                 0x0000ff00
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_R_SHIFT                                        16
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_R_MASK                                 0x00ff0000
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_A_SHIFT                                        24
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_A_MASK                                 0xff000000
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR(x)                                   (0x00000414+((x)*32))
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR__SIZE                                        0x00000010
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_B_SHIFT                             0
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_B_MASK                              0x000000ff
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_G_SHIFT                             8
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_G_MASK                              0x0000ff00
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_R_SHIFT                             16
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_R_MASK                              0x00ff0000
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_FOG_SHIFT                           24
+#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_FOG_MASK                            0xff000000
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_TU(x)                                         (0x00000418+((x)*32))
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_TU__SIZE                                      0x00000010
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_TV(x)                                         (0x0000041c+((x)*32))
+#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_TV__SIZE                                      0x00000010
+#define  NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE(x)                                       (0x00000600+((x)*4))
+#define  NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE__SIZE                                    0x00000040
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I0_SHIFT                                        0
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I0_MASK                                 0x0000000f
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I1_SHIFT                                        4
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I1_MASK                                 0x000000f0
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I2_SHIFT                                        8
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I2_MASK                                 0x00000f00
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I3_SHIFT                                        12
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I3_MASK                                 0x0000f000
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I4_SHIFT                                        16
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I4_MASK                                 0x000f0000
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I5_SHIFT                                        20
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I5_MASK                                 0x00f00000
+
+
+#define NV04_MULTITEX_TRIANGLE                                                         0x00000055
+
+#define  NV04_MULTITEX_TRIANGLE_NOP                                                    0x00000100
+#define  NV04_MULTITEX_TRIANGLE_NOTIFY                                                 0x00000104
+#define  NV04_MULTITEX_TRIANGLE_DMA_NOTIFY                                             0x00000180
+#define  NV04_MULTITEX_TRIANGLE_DMA_A                                                  0x00000184
+#define  NV04_MULTITEX_TRIANGLE_DMA_B                                                  0x00000188
+#define  NV04_MULTITEX_TRIANGLE_SURFACE                                                        0x0000018c
+#define  NV04_MULTITEX_TRIANGLE_OFFSET(x)                                              (0x00000308+((x)*4))
+#define  NV04_MULTITEX_TRIANGLE_OFFSET__SIZE                                           0x00000002
+#define  NV04_MULTITEX_TRIANGLE_FORMAT(x)                                              (0x00000310+((x)*4))
+#define  NV04_MULTITEX_TRIANGLE_FORMAT__SIZE                                           0x00000002
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_DMA_A                                          (1 <<  0)
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_DMA_B                                          (1 <<  1)
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_ZOH_SHIFT                               4
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_ZOH_MASK                                        0x00000030
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_FOH_SHIFT                               6
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_FOH_MASK                                        0x000000c0
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_COLOR_SHIFT                                    8
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_COLOR_MASK                                     0x00000f00
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_MIPMAP_LEVELS_SHIFT                            12
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_MIPMAP_LEVELS_MASK                             0x0000f000
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_U_SHIFT                              16
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_U_MASK                               0x000f0000
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_V_SHIFT                              20
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_V_MASK                               0x00f00000
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSU_SHIFT                                 24
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSU_MASK                                  0x07000000
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_WRAPU                                          (1 << 27)
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSV_SHIFT                                 28
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSV_MASK                                  0x70000000
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_WRAPV                                          (1 << 31)
+#define  NV04_MULTITEX_TRIANGLE_FILTER(x)                                              (0x00000318+((x)*4))
+#define  NV04_MULTITEX_TRIANGLE_FILTER__SIZE                                           0x00000002
+#define   NV04_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_X_SHIFT                            0
+#define   NV04_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_X_MASK                             0x000000ff
+#define   NV04_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_Y_SHIFT                            8
+#define   NV04_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_Y_MASK                             0x00007f00
+#define   NV04_MULTITEX_TRIANGLE_FILTER_MIPMAP_DITHER_ENABLE                           (1 << 15)
+#define   NV04_MULTITEX_TRIANGLE_FILTER_MIPMAP_LODBIAS_SHIFT                           16
+#define   NV04_MULTITEX_TRIANGLE_FILTER_MIPMAP_LODBIAS_MASK                            0x00ff0000
+#define   NV04_MULTITEX_TRIANGLE_FILTER_MINIFY_SHIFT                                   24
+#define   NV04_MULTITEX_TRIANGLE_FILTER_MINIFY_MASK                                    0x07000000
+#define   NV04_MULTITEX_TRIANGLE_FILTER_ANISOTROPIC_MINIFY_ENABLE                      (1 << 27)
+#define   NV04_MULTITEX_TRIANGLE_FILTER_MAGNIFY_SHIFT                                  28
+#define   NV04_MULTITEX_TRIANGLE_FILTER_MAGNIFY_MASK                                   0x70000000
+#define   NV04_MULTITEX_TRIANGLE_FILTER_ANISOTROPIC_MAGNIFY_ENABLE                     (1 << 31)
+#define  NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA(x)                                       (0x00000320+((x)*12))
+#define  NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA__SIZE                                    0x00000002
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE0                                        (1 <<  0)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_SHIFT                         2
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_MASK                          0x000000fc
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_ZERO                         0x00000004
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_CONSTANT                     0x00000008
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_PRIMARY_COLOR                        0x0000000c
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_PREVIOUS                     0x00000010
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_TEXTURE0                     0x00000014
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_TEXTURE1                     0x00000018
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE1                                        (1 <<  8)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_SHIFT                         10
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_MASK                          0x0000fc00
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_ZERO                         0x00000400
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_CONSTANT                     0x00000800
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_PRIMARY_COLOR                        0x00000c00
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_PREVIOUS                     0x00001000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_TEXTURE0                     0x00001400
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_TEXTURE1                     0x00001800
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE2                                        (1 << 16)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_SHIFT                         18
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_MASK                          0x00fc0000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_ZERO                         0x00040000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_CONSTANT                     0x00080000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_PRIMARY_COLOR                        0x000c0000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_PREVIOUS                     0x00100000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_TEXTURE0                     0x00140000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_TEXTURE1                     0x00180000
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE3                                        (1 << 24)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_SHIFT                         26
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_MASK                          0x1c000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_ZERO                         0x04000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_CONSTANT                     0x08000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_PRIMARY_COLOR                        0x0c000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_PREVIOUS                     0x10000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_TEXTURE0                     0x14000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_TEXTURE1                     0x18000000
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_SHIFT                               29
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_MASK                                        0xe0000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_IDENTITY                           0x20000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_SCALE2                             0x40000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_SCALE4                             0x60000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_BIAS                               0x80000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_BIAS_SCALE2                                0xe0000000
+#define  NV04_MULTITEX_TRIANGLE_COMBINE_COLOR(x)                                       (0x00000324+((x)*12))
+#define  NV04_MULTITEX_TRIANGLE_COMBINE_COLOR__SIZE                                    0x00000002
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE0                                        (1 <<  0)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA0                                  (1 <<  1)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_SHIFT                         2
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_MASK                          0x000000fc
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_ZERO                         0x00000004
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_CONSTANT                     0x00000008
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_PRIMARY_COLOR                        0x0000000c
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_PREVIOUS                     0x00000010
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_TEXTURE0                     0x00000014
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_TEXTURE1                     0x00000018
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE1                                        (1 <<  8)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA1                                  (1 <<  9)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_SHIFT                         10
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_MASK                          0x0000fc00
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_ZERO                         0x00000400
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_CONSTANT                     0x00000800
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_PRIMARY_COLOR                        0x00000c00
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_PREVIOUS                     0x00001000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_TEXTURE0                     0x00001400
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_TEXTURE1                     0x00001800
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE2                                        (1 << 16)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA2                                  (1 << 17)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_SHIFT                         18
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_MASK                          0x00fc0000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_ZERO                         0x00040000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_CONSTANT                     0x00080000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_PRIMARY_COLOR                        0x000c0000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_PREVIOUS                     0x00100000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_TEXTURE0                     0x00140000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_TEXTURE1                     0x00180000
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE3                                        (1 << 24)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA3                                  (1 << 25)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_SHIFT                         26
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_MASK                          0x1c000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_ZERO                         0x04000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_CONSTANT                     0x08000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_PRIMARY_COLOR                        0x0c000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_PREVIOUS                     0x10000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_TEXTURE0                     0x14000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_TEXTURE1                     0x18000000
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_SHIFT                               29
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_MASK                                        0xe0000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_IDENTITY                           0x20000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_SCALE2                             0x40000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_SCALE4                             0x60000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_BIAS                               0x80000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_BIAS_SCALE2                                0xe0000000
+#define  NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR                                         0x00000334
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_B_SHIFT                                        0
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_B_MASK                                 0x000000ff
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_G_SHIFT                                        8
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_G_MASK                                 0x0000ff00
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_R_SHIFT                                        16
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_R_MASK                                 0x00ff0000
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_A_SHIFT                                        24
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_A_MASK                                 0xff000000
+#define  NV04_MULTITEX_TRIANGLE_BLEND                                                  0x00000338
+#define   NV04_MULTITEX_TRIANGLE_BLEND_MASK_BIT_SHIFT                                  4
+#define   NV04_MULTITEX_TRIANGLE_BLEND_MASK_BIT_MASK                                   0x00000030
+#define   NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_SHIFT                                        6
+#define   NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_MASK                                 0x000000c0
+#define    NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_FLAT                                        0x00000040
+#define    NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_GOURAUD                             0x00000080
+#define    NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_PHONG                               0x000000c0
+#define   NV04_MULTITEX_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE                      (1 <<  8)
+#define   NV04_MULTITEX_TRIANGLE_BLEND_SPECULAR_ENABLE_SHIFT                           12
+#define   NV04_MULTITEX_TRIANGLE_BLEND_SPECULAR_ENABLE_MASK                            0x0000f000
+#define   NV04_MULTITEX_TRIANGLE_BLEND_FOG_ENABLE_SHIFT                                        16
+#define   NV04_MULTITEX_TRIANGLE_BLEND_FOG_ENABLE_MASK                                 0x000f0000
+#define   NV04_MULTITEX_TRIANGLE_BLEND_BLEND_ENABLE                                    (1 << 20)
+#define   NV04_MULTITEX_TRIANGLE_BLEND_SRC_SHIFT                                       24
+#define   NV04_MULTITEX_TRIANGLE_BLEND_SRC_MASK                                                0x0f000000
+#define   NV04_MULTITEX_TRIANGLE_BLEND_DST_SHIFT                                       28
+#define   NV04_MULTITEX_TRIANGLE_BLEND_DST_MASK                                                0xf0000000
+#define  NV04_MULTITEX_TRIANGLE_CONTROL0                                               0x0000033c
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_REF_SHIFT                              0
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_REF_MASK                               0x000000ff
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_SHIFT                             8
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_MASK                              0x00000f00
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_ENABLE                                 (1 << 12)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_ORIGIN                                       (1 << 13)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_ENABLE                                     (1 << 14)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_SHIFT                                 16
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_MASK                                  0x000f0000
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_SHIFT                              20
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_MASK                               0x00300000
+#define    NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_BOTH                              0x00000000
+#define    NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_NONE                              0x00100000
+#define    NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_CW                                        0x00200000
+#define    NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_CCW                               0x00300000
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_DITHER_ENABLE                                        (1 << 22)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_PERSPECTIVE_ENABLE                         (1 << 23)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_WRITE                                      (1 << 24)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_STENCIL_WRITE                                        (1 << 25)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_WRITE                                  (1 << 26)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_RED_WRITE                                    (1 << 27)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_GREEN_WRITE                                  (1 << 28)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_BLUE_WRITE                                   (1 << 29)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FORMAT_SHIFT                               30
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FORMAT_MASK                                        0xc0000000
+#define  NV04_MULTITEX_TRIANGLE_CONTROL1                                               0x00000340
+#define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_ENABLE                               (1 <<  0)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_FUNC_SHIFT                           4
+#define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_FUNC_MASK                            0x000000f0
+#define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_REF_SHIFT                            8
+#define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_REF_MASK                             0x0000ff00
+#define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_READ_SHIFT                      16
+#define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_READ_MASK                       0x00ff0000
+#define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_WRITE_SHIFT                     24
+#define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_WRITE_MASK                      0xff000000
+#define  NV04_MULTITEX_TRIANGLE_CONTROL2                                               0x00000344
+#define   NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_FAIL_SHIFT                                0
+#define   NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_FAIL_MASK                         0x0000000f
+#define   NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZFAIL_SHIFT                       4
+#define   NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZFAIL_MASK                                0x000000f0
+#define   NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZPASS_SHIFT                       8
+#define   NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZPASS_MASK                                0x00000f00
+#define  NV04_MULTITEX_TRIANGLE_FOGCOLOR                                               0x00000348
+#define   NV04_MULTITEX_TRIANGLE_FOGCOLOR_B_SHIFT                                      0
+#define   NV04_MULTITEX_TRIANGLE_FOGCOLOR_B_MASK                                       0x000000ff
+#define   NV04_MULTITEX_TRIANGLE_FOGCOLOR_G_SHIFT                                      8
+#define   NV04_MULTITEX_TRIANGLE_FOGCOLOR_G_MASK                                       0x0000ff00
+#define   NV04_MULTITEX_TRIANGLE_FOGCOLOR_R_SHIFT                                      16
+#define   NV04_MULTITEX_TRIANGLE_FOGCOLOR_R_MASK                                       0x00ff0000
+#define   NV04_MULTITEX_TRIANGLE_FOGCOLOR_A_SHIFT                                      24
+#define   NV04_MULTITEX_TRIANGLE_FOGCOLOR_A_MASK                                       0xff000000
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SX(x)                                       (0x00000400+((x)*40))
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SX__SIZE                                    0x00000008
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SY(x)                                       (0x00000404+((x)*40))
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SY__SIZE                                    0x00000008
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SZ(x)                                       (0x00000408+((x)*40))
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SZ__SIZE                                    0x00000008
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_RHW(x)                                      (0x0000040c+((x)*40))
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_RHW__SIZE                                   0x00000008
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR(x)                                    (0x00000410+((x)*40))
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR__SIZE                                 0x00000008
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_B_SHIFT                              0
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_B_MASK                               0x000000ff
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_G_SHIFT                              8
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_G_MASK                               0x0000ff00
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_R_SHIFT                              16
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_R_MASK                               0x00ff0000
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_A_SHIFT                              24
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_A_MASK                               0xff000000
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR(x)                                 (0x00000414+((x)*40))
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR__SIZE                              0x00000008
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_B_SHIFT                           0
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_B_MASK                            0x000000ff
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_G_SHIFT                           8
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_G_MASK                            0x0000ff00
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_R_SHIFT                           16
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_R_MASK                            0x00ff0000
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_FOG_SHIFT                         24
+#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_FOG_MASK                          0xff000000
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TU0(x)                                      (0x00000418+((x)*40))
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TU0__SIZE                                   0x00000008
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TV0(x)                                      (0x0000041c+((x)*40))
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TV0__SIZE                                   0x00000008
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TU1(x)                                      (0x00000420+((x)*40))
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TU1__SIZE                                   0x00000008
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TV1(x)                                      (0x00000424+((x)*40))
+#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TV1__SIZE                                   0x00000008
+#define  NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE(x)                                       (0x00000540+((x)*4))
+#define  NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE__SIZE                                    0x00000030
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I0_SHIFT                                        0
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I0_MASK                                 0x0000000f
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I1_SHIFT                                        4
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I1_MASK                                 0x000000f0
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I2_SHIFT                                        8
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I2_MASK                                 0x00000f00
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I3_SHIFT                                        12
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I3_MASK                                 0x0000f000
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I4_SHIFT                                        16
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I4_MASK                                 0x000f0000
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I5_SHIFT                                        20
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I5_MASK                                 0x00f00000
 
 
 #define NV10TCL                                                                                0x00000056
@@ -1845,6 +1866,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define    NV10TCL_TX_FORMAT_WRAP_T_CLAMP                                              0x50000000
 #define  NV10TCL_TX_ENABLE(x)                                                          (0x00000228+((x)*4))
 #define  NV10TCL_TX_ENABLE__SIZE                                                       0x00000002
+#define   NV10TCL_TX_ENABLE_CULL_SHIFT                                                 0
+#define   NV10TCL_TX_ENABLE_CULL_MASK                                                  0x0000000f
+#define    NV10TCL_TX_ENABLE_CULL_DISABLED                                             0x00000000
+#define    NV10TCL_TX_ENABLE_CULL_TEST_ALL                                             0x00000003
+#define    NV10TCL_TX_ENABLE_CULL_TEST_ALPHA                                           0x00000004
 #define   NV10TCL_TX_ENABLE_ANISOTROPY_SHIFT                                           4
 #define   NV10TCL_TX_ENABLE_ANISOTROPY_MASK                                            0x00000030
 #define   NV10TCL_TX_ENABLE_MIPMAP_MAX_LOD_SHIFT                                       14
@@ -1885,237 +1911,237 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV10TCL_RC_IN_ALPHA_D_INPUT_SHIFT                                            0
 #define   NV10TCL_RC_IN_ALPHA_D_INPUT_MASK                                             0x0000000f
 #define    NV10TCL_RC_IN_ALPHA_D_INPUT_ZERO                                            0x00000000
-#define    NV10TCL_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR0_NV                              0x00000001
-#define    NV10TCL_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR1_NV                              0x00000002
+#define    NV10TCL_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR0                                 0x00000001
+#define    NV10TCL_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR1                                 0x00000002
 #define    NV10TCL_RC_IN_ALPHA_D_INPUT_FOG                                             0x00000003
-#define    NV10TCL_RC_IN_ALPHA_D_INPUT_PRIMARY_COLOR_NV                                        0x00000004
-#define    NV10TCL_RC_IN_ALPHA_D_INPUT_SECONDARY_COLOR_NV                              0x00000005
-#define    NV10TCL_RC_IN_ALPHA_D_INPUT_TEXTURE0_ARB                                    0x00000008
-#define    NV10TCL_RC_IN_ALPHA_D_INPUT_TEXTURE1_ARB                                    0x00000009
-#define    NV10TCL_RC_IN_ALPHA_D_INPUT_SPARE0_NV                                       0x0000000c
-#define    NV10TCL_RC_IN_ALPHA_D_INPUT_SPARE1_NV                                       0x0000000d
-#define    NV10TCL_RC_IN_ALPHA_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                  0x0000000e
-#define    NV10TCL_RC_IN_ALPHA_D_INPUT_E_TIMES_F_NV                                    0x0000000f
-#define    NV10TCL_RC_IN_ALPHA_D_INPUT_TEXTURE2_ARB                                    0x0000000a
-#define    NV10TCL_RC_IN_ALPHA_D_INPUT_TEXTURE3_ARB                                    0x0000000b
+#define    NV10TCL_RC_IN_ALPHA_D_INPUT_PRIMARY_COLOR                                   0x00000004
+#define    NV10TCL_RC_IN_ALPHA_D_INPUT_SECONDARY_COLOR                                 0x00000005
+#define    NV10TCL_RC_IN_ALPHA_D_INPUT_TEXTURE0                                                0x00000008
+#define    NV10TCL_RC_IN_ALPHA_D_INPUT_TEXTURE1                                                0x00000009
+#define    NV10TCL_RC_IN_ALPHA_D_INPUT_SPARE0                                          0x0000000c
+#define    NV10TCL_RC_IN_ALPHA_D_INPUT_SPARE1                                          0x0000000d
+#define    NV10TCL_RC_IN_ALPHA_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR                     0x0000000e
+#define    NV10TCL_RC_IN_ALPHA_D_INPUT_E_TIMES_F                                       0x0000000f
+#define    NV10TCL_RC_IN_ALPHA_D_INPUT_TEXTURE2                                                0x0000000a
+#define    NV10TCL_RC_IN_ALPHA_D_INPUT_TEXTURE3                                                0x0000000b
 #define   NV10TCL_RC_IN_ALPHA_D_COMPONENT_USAGE                                                (1 <<  4)
 #define    NV10TCL_RC_IN_ALPHA_D_COMPONENT_USAGE_BLUE                                  0x00000000
 #define    NV10TCL_RC_IN_ALPHA_D_COMPONENT_USAGE_ALPHA                                 0x00000010
 #define   NV10TCL_RC_IN_ALPHA_D_MAPPING_SHIFT                                          5
 #define   NV10TCL_RC_IN_ALPHA_D_MAPPING_MASK                                           0x000000e0
-#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_UNSIGNED_IDENTITY_NV                          0x00000000
-#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_UNSIGNED_INVERT_NV                            0x00000020
-#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_EXPAND_NORMAL_NV                              0x00000040
-#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_EXPAND_NEGATE_NV                              0x00000060
-#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NORMAL_NV                           0x00000080
-#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NEGATE_NV                           0x000000a0
-#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_SIGNED_IDENTITY_NV                            0x000000c0
-#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_SIGNED_NEGATE_NV                              0x000000e0
+#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_UNSIGNED_IDENTITY                             0x00000000
+#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_UNSIGNED_INVERT                               0x00000020
+#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_EXPAND_NORMAL                                 0x00000040
+#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_EXPAND_NEGATE                                 0x00000060
+#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NORMAL                              0x00000080
+#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NEGATE                              0x000000a0
+#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_SIGNED_IDENTITY                               0x000000c0
+#define    NV10TCL_RC_IN_ALPHA_D_MAPPING_SIGNED_NEGATE                                 0x000000e0
 #define   NV10TCL_RC_IN_ALPHA_C_INPUT_SHIFT                                            8
 #define   NV10TCL_RC_IN_ALPHA_C_INPUT_MASK                                             0x00000f00
 #define    NV10TCL_RC_IN_ALPHA_C_INPUT_ZERO                                            0x00000000
-#define    NV10TCL_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR0_NV                              0x00000100
-#define    NV10TCL_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR1_NV                              0x00000200
+#define    NV10TCL_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR0                                 0x00000100
+#define    NV10TCL_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR1                                 0x00000200
 #define    NV10TCL_RC_IN_ALPHA_C_INPUT_FOG                                             0x00000300
-#define    NV10TCL_RC_IN_ALPHA_C_INPUT_PRIMARY_COLOR_NV                                        0x00000400
-#define    NV10TCL_RC_IN_ALPHA_C_INPUT_SECONDARY_COLOR_NV                              0x00000500
-#define    NV10TCL_RC_IN_ALPHA_C_INPUT_TEXTURE0_ARB                                    0x00000800
-#define    NV10TCL_RC_IN_ALPHA_C_INPUT_TEXTURE1_ARB                                    0x00000900
-#define    NV10TCL_RC_IN_ALPHA_C_INPUT_SPARE0_NV                                       0x00000c00
-#define    NV10TCL_RC_IN_ALPHA_C_INPUT_SPARE1_NV                                       0x00000d00
-#define    NV10TCL_RC_IN_ALPHA_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                  0x00000e00
-#define    NV10TCL_RC_IN_ALPHA_C_INPUT_E_TIMES_F_NV                                    0x00000f00
-#define    NV10TCL_RC_IN_ALPHA_C_INPUT_TEXTURE2_ARB                                    0x00000a00
-#define    NV10TCL_RC_IN_ALPHA_C_INPUT_TEXTURE3_ARB                                    0x00000b00
+#define    NV10TCL_RC_IN_ALPHA_C_INPUT_PRIMARY_COLOR                                   0x00000400
+#define    NV10TCL_RC_IN_ALPHA_C_INPUT_SECONDARY_COLOR                                 0x00000500
+#define    NV10TCL_RC_IN_ALPHA_C_INPUT_TEXTURE0                                                0x00000800
+#define    NV10TCL_RC_IN_ALPHA_C_INPUT_TEXTURE1                                                0x00000900
+#define    NV10TCL_RC_IN_ALPHA_C_INPUT_SPARE0                                          0x00000c00
+#define    NV10TCL_RC_IN_ALPHA_C_INPUT_SPARE1                                          0x00000d00
+#define    NV10TCL_RC_IN_ALPHA_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR                     0x00000e00
+#define    NV10TCL_RC_IN_ALPHA_C_INPUT_E_TIMES_F                                       0x00000f00
+#define    NV10TCL_RC_IN_ALPHA_C_INPUT_TEXTURE2                                                0x00000a00
+#define    NV10TCL_RC_IN_ALPHA_C_INPUT_TEXTURE3                                                0x00000b00
 #define   NV10TCL_RC_IN_ALPHA_C_COMPONENT_USAGE                                                (1 << 12)
 #define    NV10TCL_RC_IN_ALPHA_C_COMPONENT_USAGE_BLUE                                  0x00000000
 #define    NV10TCL_RC_IN_ALPHA_C_COMPONENT_USAGE_ALPHA                                 0x00001000
 #define   NV10TCL_RC_IN_ALPHA_C_MAPPING_SHIFT                                          13
 #define   NV10TCL_RC_IN_ALPHA_C_MAPPING_MASK                                           0x0000e000
-#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_UNSIGNED_IDENTITY_NV                          0x00000000
-#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_UNSIGNED_INVERT_NV                            0x00002000
-#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_EXPAND_NORMAL_NV                              0x00004000
-#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_EXPAND_NEGATE_NV                              0x00006000
-#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NORMAL_NV                           0x00008000
-#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NEGATE_NV                           0x0000a000
-#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_SIGNED_IDENTITY_NV                            0x0000c000
-#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_SIGNED_NEGATE_NV                              0x0000e000
+#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_UNSIGNED_IDENTITY                             0x00000000
+#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_UNSIGNED_INVERT                               0x00002000
+#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_EXPAND_NORMAL                                 0x00004000
+#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_EXPAND_NEGATE                                 0x00006000
+#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NORMAL                              0x00008000
+#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NEGATE                              0x0000a000
+#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_SIGNED_IDENTITY                               0x0000c000
+#define    NV10TCL_RC_IN_ALPHA_C_MAPPING_SIGNED_NEGATE                                 0x0000e000
 #define   NV10TCL_RC_IN_ALPHA_B_INPUT_SHIFT                                            16
 #define   NV10TCL_RC_IN_ALPHA_B_INPUT_MASK                                             0x000f0000
 #define    NV10TCL_RC_IN_ALPHA_B_INPUT_ZERO                                            0x00000000
-#define    NV10TCL_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR0_NV                              0x00010000
-#define    NV10TCL_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR1_NV                              0x00020000
+#define    NV10TCL_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR0                                 0x00010000
+#define    NV10TCL_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR1                                 0x00020000
 #define    NV10TCL_RC_IN_ALPHA_B_INPUT_FOG                                             0x00030000
-#define    NV10TCL_RC_IN_ALPHA_B_INPUT_PRIMARY_COLOR_NV                                        0x00040000
-#define    NV10TCL_RC_IN_ALPHA_B_INPUT_SECONDARY_COLOR_NV                              0x00050000
-#define    NV10TCL_RC_IN_ALPHA_B_INPUT_TEXTURE0_ARB                                    0x00080000
-#define    NV10TCL_RC_IN_ALPHA_B_INPUT_TEXTURE1_ARB                                    0x00090000
-#define    NV10TCL_RC_IN_ALPHA_B_INPUT_SPARE0_NV                                       0x000c0000
-#define    NV10TCL_RC_IN_ALPHA_B_INPUT_SPARE1_NV                                       0x000d0000
-#define    NV10TCL_RC_IN_ALPHA_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                  0x000e0000
-#define    NV10TCL_RC_IN_ALPHA_B_INPUT_E_TIMES_F_NV                                    0x000f0000
-#define    NV10TCL_RC_IN_ALPHA_B_INPUT_TEXTURE2_ARB                                    0x000a0000
-#define    NV10TCL_RC_IN_ALPHA_B_INPUT_TEXTURE3_ARB                                    0x000b0000
+#define    NV10TCL_RC_IN_ALPHA_B_INPUT_PRIMARY_COLOR                                   0x00040000
+#define    NV10TCL_RC_IN_ALPHA_B_INPUT_SECONDARY_COLOR                                 0x00050000
+#define    NV10TCL_RC_IN_ALPHA_B_INPUT_TEXTURE0                                                0x00080000
+#define    NV10TCL_RC_IN_ALPHA_B_INPUT_TEXTURE1                                                0x00090000
+#define    NV10TCL_RC_IN_ALPHA_B_INPUT_SPARE0                                          0x000c0000
+#define    NV10TCL_RC_IN_ALPHA_B_INPUT_SPARE1                                          0x000d0000
+#define    NV10TCL_RC_IN_ALPHA_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR                     0x000e0000
+#define    NV10TCL_RC_IN_ALPHA_B_INPUT_E_TIMES_F                                       0x000f0000
+#define    NV10TCL_RC_IN_ALPHA_B_INPUT_TEXTURE2                                                0x000a0000
+#define    NV10TCL_RC_IN_ALPHA_B_INPUT_TEXTURE3                                                0x000b0000
 #define   NV10TCL_RC_IN_ALPHA_B_COMPONENT_USAGE                                                (1 << 20)
 #define    NV10TCL_RC_IN_ALPHA_B_COMPONENT_USAGE_BLUE                                  0x00000000
 #define    NV10TCL_RC_IN_ALPHA_B_COMPONENT_USAGE_ALPHA                                 0x00100000
 #define   NV10TCL_RC_IN_ALPHA_B_MAPPING_SHIFT                                          21
 #define   NV10TCL_RC_IN_ALPHA_B_MAPPING_MASK                                           0x00e00000
-#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_UNSIGNED_IDENTITY_NV                          0x00000000
-#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_UNSIGNED_INVERT_NV                            0x00200000
-#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_EXPAND_NORMAL_NV                              0x00400000
-#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_EXPAND_NEGATE_NV                              0x00600000
-#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NORMAL_NV                           0x00800000
-#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NEGATE_NV                           0x00a00000
-#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_SIGNED_IDENTITY_NV                            0x00c00000
-#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_SIGNED_NEGATE_NV                              0x00e00000
+#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_UNSIGNED_IDENTITY                             0x00000000
+#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_UNSIGNED_INVERT                               0x00200000
+#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_EXPAND_NORMAL                                 0x00400000
+#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_EXPAND_NEGATE                                 0x00600000
+#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NORMAL                              0x00800000
+#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NEGATE                              0x00a00000
+#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_SIGNED_IDENTITY                               0x00c00000
+#define    NV10TCL_RC_IN_ALPHA_B_MAPPING_SIGNED_NEGATE                                 0x00e00000
 #define   NV10TCL_RC_IN_ALPHA_A_INPUT_SHIFT                                            24
 #define   NV10TCL_RC_IN_ALPHA_A_INPUT_MASK                                             0x0f000000
 #define    NV10TCL_RC_IN_ALPHA_A_INPUT_ZERO                                            0x00000000
-#define    NV10TCL_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR0_NV                              0x01000000
-#define    NV10TCL_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR1_NV                              0x02000000
+#define    NV10TCL_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR0                                 0x01000000
+#define    NV10TCL_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR1                                 0x02000000
 #define    NV10TCL_RC_IN_ALPHA_A_INPUT_FOG                                             0x03000000
-#define    NV10TCL_RC_IN_ALPHA_A_INPUT_PRIMARY_COLOR_NV                                        0x04000000
-#define    NV10TCL_RC_IN_ALPHA_A_INPUT_SECONDARY_COLOR_NV                              0x05000000
-#define    NV10TCL_RC_IN_ALPHA_A_INPUT_TEXTURE0_ARB                                    0x08000000
-#define    NV10TCL_RC_IN_ALPHA_A_INPUT_TEXTURE1_ARB                                    0x09000000
-#define    NV10TCL_RC_IN_ALPHA_A_INPUT_SPARE0_NV                                       0x0c000000
-#define    NV10TCL_RC_IN_ALPHA_A_INPUT_SPARE1_NV                                       0x0d000000
-#define    NV10TCL_RC_IN_ALPHA_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                  0x0e000000
-#define    NV10TCL_RC_IN_ALPHA_A_INPUT_E_TIMES_F_NV                                    0x0f000000
-#define    NV10TCL_RC_IN_ALPHA_A_INPUT_TEXTURE2_ARB                                    0x0a000000
-#define    NV10TCL_RC_IN_ALPHA_A_INPUT_TEXTURE3_ARB                                    0x0b000000
+#define    NV10TCL_RC_IN_ALPHA_A_INPUT_PRIMARY_COLOR                                   0x04000000
+#define    NV10TCL_RC_IN_ALPHA_A_INPUT_SECONDARY_COLOR                                 0x05000000
+#define    NV10TCL_RC_IN_ALPHA_A_INPUT_TEXTURE0                                                0x08000000
+#define    NV10TCL_RC_IN_ALPHA_A_INPUT_TEXTURE1                                                0x09000000
+#define    NV10TCL_RC_IN_ALPHA_A_INPUT_SPARE0                                          0x0c000000
+#define    NV10TCL_RC_IN_ALPHA_A_INPUT_SPARE1                                          0x0d000000
+#define    NV10TCL_RC_IN_ALPHA_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR                     0x0e000000
+#define    NV10TCL_RC_IN_ALPHA_A_INPUT_E_TIMES_F                                       0x0f000000
+#define    NV10TCL_RC_IN_ALPHA_A_INPUT_TEXTURE2                                                0x0a000000
+#define    NV10TCL_RC_IN_ALPHA_A_INPUT_TEXTURE3                                                0x0b000000
 #define   NV10TCL_RC_IN_ALPHA_A_COMPONENT_USAGE                                                (1 << 28)
 #define    NV10TCL_RC_IN_ALPHA_A_COMPONENT_USAGE_BLUE                                  0x00000000
 #define    NV10TCL_RC_IN_ALPHA_A_COMPONENT_USAGE_ALPHA                                 0x10000000
 #define   NV10TCL_RC_IN_ALPHA_A_MAPPING_SHIFT                                          29
 #define   NV10TCL_RC_IN_ALPHA_A_MAPPING_MASK                                           0xe0000000
-#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_UNSIGNED_IDENTITY_NV                          0x00000000
-#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_UNSIGNED_INVERT_NV                            0x20000000
-#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_EXPAND_NORMAL_NV                              0x40000000
-#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_EXPAND_NEGATE_NV                              0x60000000
-#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NORMAL_NV                           0x80000000
-#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NEGATE_NV                           0xa0000000
-#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_SIGNED_IDENTITY_NV                            0xc0000000
-#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_SIGNED_NEGATE_NV                              0xe0000000
+#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_UNSIGNED_IDENTITY                             0x00000000
+#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_UNSIGNED_INVERT                               0x20000000
+#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_EXPAND_NORMAL                                 0x40000000
+#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_EXPAND_NEGATE                                 0x60000000
+#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NORMAL                              0x80000000
+#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NEGATE                              0xa0000000
+#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_SIGNED_IDENTITY                               0xc0000000
+#define    NV10TCL_RC_IN_ALPHA_A_MAPPING_SIGNED_NEGATE                                 0xe0000000
 #define  NV10TCL_RC_IN_RGB(x)                                                          (0x00000268+((x)*4))
 #define  NV10TCL_RC_IN_RGB__SIZE                                                       0x00000002
 #define   NV10TCL_RC_IN_RGB_D_INPUT_SHIFT                                              0
 #define   NV10TCL_RC_IN_RGB_D_INPUT_MASK                                               0x0000000f
 #define    NV10TCL_RC_IN_RGB_D_INPUT_ZERO                                              0x00000000
-#define    NV10TCL_RC_IN_RGB_D_INPUT_CONSTANT_COLOR0_NV                                        0x00000001
-#define    NV10TCL_RC_IN_RGB_D_INPUT_CONSTANT_COLOR1_NV                                        0x00000002
+#define    NV10TCL_RC_IN_RGB_D_INPUT_CONSTANT_COLOR0                                   0x00000001
+#define    NV10TCL_RC_IN_RGB_D_INPUT_CONSTANT_COLOR1                                   0x00000002
 #define    NV10TCL_RC_IN_RGB_D_INPUT_FOG                                               0x00000003
-#define    NV10TCL_RC_IN_RGB_D_INPUT_PRIMARY_COLOR_NV                                  0x00000004
-#define    NV10TCL_RC_IN_RGB_D_INPUT_SECONDARY_COLOR_NV                                        0x00000005
-#define    NV10TCL_RC_IN_RGB_D_INPUT_TEXTURE0_ARB                                      0x00000008
-#define    NV10TCL_RC_IN_RGB_D_INPUT_TEXTURE1_ARB                                      0x00000009
-#define    NV10TCL_RC_IN_RGB_D_INPUT_SPARE0_NV                                         0x0000000c
-#define    NV10TCL_RC_IN_RGB_D_INPUT_SPARE1_NV                                         0x0000000d
-#define    NV10TCL_RC_IN_RGB_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x0000000e
-#define    NV10TCL_RC_IN_RGB_D_INPUT_E_TIMES_F_NV                                      0x0000000f
-#define    NV10TCL_RC_IN_RGB_D_INPUT_TEXTURE2_ARB                                      0x0000000a
-#define    NV10TCL_RC_IN_RGB_D_INPUT_TEXTURE3_ARB                                      0x0000000b
+#define    NV10TCL_RC_IN_RGB_D_INPUT_PRIMARY_COLOR                                     0x00000004
+#define    NV10TCL_RC_IN_RGB_D_INPUT_SECONDARY_COLOR                                   0x00000005
+#define    NV10TCL_RC_IN_RGB_D_INPUT_TEXTURE0                                          0x00000008
+#define    NV10TCL_RC_IN_RGB_D_INPUT_TEXTURE1                                          0x00000009
+#define    NV10TCL_RC_IN_RGB_D_INPUT_SPARE0                                            0x0000000c
+#define    NV10TCL_RC_IN_RGB_D_INPUT_SPARE1                                            0x0000000d
+#define    NV10TCL_RC_IN_RGB_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x0000000e
+#define    NV10TCL_RC_IN_RGB_D_INPUT_E_TIMES_F                                         0x0000000f
+#define    NV10TCL_RC_IN_RGB_D_INPUT_TEXTURE2                                          0x0000000a
+#define    NV10TCL_RC_IN_RGB_D_INPUT_TEXTURE3                                          0x0000000b
 #define   NV10TCL_RC_IN_RGB_D_COMPONENT_USAGE                                          (1 <<  4)
 #define    NV10TCL_RC_IN_RGB_D_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV10TCL_RC_IN_RGB_D_COMPONENT_USAGE_ALPHA                                   0x00000010
 #define   NV10TCL_RC_IN_RGB_D_MAPPING_SHIFT                                            5
 #define   NV10TCL_RC_IN_RGB_D_MAPPING_MASK                                             0x000000e0
-#define    NV10TCL_RC_IN_RGB_D_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV10TCL_RC_IN_RGB_D_MAPPING_UNSIGNED_INVERT_NV                              0x00000020
-#define    NV10TCL_RC_IN_RGB_D_MAPPING_EXPAND_NORMAL_NV                                        0x00000040
-#define    NV10TCL_RC_IN_RGB_D_MAPPING_EXPAND_NEGATE_NV                                        0x00000060
-#define    NV10TCL_RC_IN_RGB_D_MAPPING_HALF_BIAS_NORMAL_NV                             0x00000080
-#define    NV10TCL_RC_IN_RGB_D_MAPPING_HALF_BIAS_NEGATE_NV                             0x000000a0
-#define    NV10TCL_RC_IN_RGB_D_MAPPING_SIGNED_IDENTITY_NV                              0x000000c0
-#define    NV10TCL_RC_IN_RGB_D_MAPPING_SIGNED_NEGATE_NV                                        0x000000e0
+#define    NV10TCL_RC_IN_RGB_D_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV10TCL_RC_IN_RGB_D_MAPPING_UNSIGNED_INVERT                                 0x00000020
+#define    NV10TCL_RC_IN_RGB_D_MAPPING_EXPAND_NORMAL                                   0x00000040
+#define    NV10TCL_RC_IN_RGB_D_MAPPING_EXPAND_NEGATE                                   0x00000060
+#define    NV10TCL_RC_IN_RGB_D_MAPPING_HALF_BIAS_NORMAL                                        0x00000080
+#define    NV10TCL_RC_IN_RGB_D_MAPPING_HALF_BIAS_NEGATE                                        0x000000a0
+#define    NV10TCL_RC_IN_RGB_D_MAPPING_SIGNED_IDENTITY                                 0x000000c0
+#define    NV10TCL_RC_IN_RGB_D_MAPPING_SIGNED_NEGATE                                   0x000000e0
 #define   NV10TCL_RC_IN_RGB_C_INPUT_SHIFT                                              8
 #define   NV10TCL_RC_IN_RGB_C_INPUT_MASK                                               0x00000f00
 #define    NV10TCL_RC_IN_RGB_C_INPUT_ZERO                                              0x00000000
-#define    NV10TCL_RC_IN_RGB_C_INPUT_CONSTANT_COLOR0_NV                                        0x00000100
-#define    NV10TCL_RC_IN_RGB_C_INPUT_CONSTANT_COLOR1_NV                                        0x00000200
+#define    NV10TCL_RC_IN_RGB_C_INPUT_CONSTANT_COLOR0                                   0x00000100
+#define    NV10TCL_RC_IN_RGB_C_INPUT_CONSTANT_COLOR1                                   0x00000200
 #define    NV10TCL_RC_IN_RGB_C_INPUT_FOG                                               0x00000300
-#define    NV10TCL_RC_IN_RGB_C_INPUT_PRIMARY_COLOR_NV                                  0x00000400
-#define    NV10TCL_RC_IN_RGB_C_INPUT_SECONDARY_COLOR_NV                                        0x00000500
-#define    NV10TCL_RC_IN_RGB_C_INPUT_TEXTURE0_ARB                                      0x00000800
-#define    NV10TCL_RC_IN_RGB_C_INPUT_TEXTURE1_ARB                                      0x00000900
-#define    NV10TCL_RC_IN_RGB_C_INPUT_SPARE0_NV                                         0x00000c00
-#define    NV10TCL_RC_IN_RGB_C_INPUT_SPARE1_NV                                         0x00000d00
-#define    NV10TCL_RC_IN_RGB_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x00000e00
-#define    NV10TCL_RC_IN_RGB_C_INPUT_E_TIMES_F_NV                                      0x00000f00
-#define    NV10TCL_RC_IN_RGB_C_INPUT_TEXTURE2_ARB                                      0x00000a00
-#define    NV10TCL_RC_IN_RGB_C_INPUT_TEXTURE3_ARB                                      0x00000b00
+#define    NV10TCL_RC_IN_RGB_C_INPUT_PRIMARY_COLOR                                     0x00000400
+#define    NV10TCL_RC_IN_RGB_C_INPUT_SECONDARY_COLOR                                   0x00000500
+#define    NV10TCL_RC_IN_RGB_C_INPUT_TEXTURE0                                          0x00000800
+#define    NV10TCL_RC_IN_RGB_C_INPUT_TEXTURE1                                          0x00000900
+#define    NV10TCL_RC_IN_RGB_C_INPUT_SPARE0                                            0x00000c00
+#define    NV10TCL_RC_IN_RGB_C_INPUT_SPARE1                                            0x00000d00
+#define    NV10TCL_RC_IN_RGB_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x00000e00
+#define    NV10TCL_RC_IN_RGB_C_INPUT_E_TIMES_F                                         0x00000f00
+#define    NV10TCL_RC_IN_RGB_C_INPUT_TEXTURE2                                          0x00000a00
+#define    NV10TCL_RC_IN_RGB_C_INPUT_TEXTURE3                                          0x00000b00
 #define   NV10TCL_RC_IN_RGB_C_COMPONENT_USAGE                                          (1 << 12)
 #define    NV10TCL_RC_IN_RGB_C_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV10TCL_RC_IN_RGB_C_COMPONENT_USAGE_ALPHA                                   0x00001000
 #define   NV10TCL_RC_IN_RGB_C_MAPPING_SHIFT                                            13
 #define   NV10TCL_RC_IN_RGB_C_MAPPING_MASK                                             0x0000e000
-#define    NV10TCL_RC_IN_RGB_C_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV10TCL_RC_IN_RGB_C_MAPPING_UNSIGNED_INVERT_NV                              0x00002000
-#define    NV10TCL_RC_IN_RGB_C_MAPPING_EXPAND_NORMAL_NV                                        0x00004000
-#define    NV10TCL_RC_IN_RGB_C_MAPPING_EXPAND_NEGATE_NV                                        0x00006000
-#define    NV10TCL_RC_IN_RGB_C_MAPPING_HALF_BIAS_NORMAL_NV                             0x00008000
-#define    NV10TCL_RC_IN_RGB_C_MAPPING_HALF_BIAS_NEGATE_NV                             0x0000a000
-#define    NV10TCL_RC_IN_RGB_C_MAPPING_SIGNED_IDENTITY_NV                              0x0000c000
-#define    NV10TCL_RC_IN_RGB_C_MAPPING_SIGNED_NEGATE_NV                                        0x0000e000
+#define    NV10TCL_RC_IN_RGB_C_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV10TCL_RC_IN_RGB_C_MAPPING_UNSIGNED_INVERT                                 0x00002000
+#define    NV10TCL_RC_IN_RGB_C_MAPPING_EXPAND_NORMAL                                   0x00004000
+#define    NV10TCL_RC_IN_RGB_C_MAPPING_EXPAND_NEGATE                                   0x00006000
+#define    NV10TCL_RC_IN_RGB_C_MAPPING_HALF_BIAS_NORMAL                                        0x00008000
+#define    NV10TCL_RC_IN_RGB_C_MAPPING_HALF_BIAS_NEGATE                                        0x0000a000
+#define    NV10TCL_RC_IN_RGB_C_MAPPING_SIGNED_IDENTITY                                 0x0000c000
+#define    NV10TCL_RC_IN_RGB_C_MAPPING_SIGNED_NEGATE                                   0x0000e000
 #define   NV10TCL_RC_IN_RGB_B_INPUT_SHIFT                                              16
 #define   NV10TCL_RC_IN_RGB_B_INPUT_MASK                                               0x000f0000
 #define    NV10TCL_RC_IN_RGB_B_INPUT_ZERO                                              0x00000000
-#define    NV10TCL_RC_IN_RGB_B_INPUT_CONSTANT_COLOR0_NV                                        0x00010000
-#define    NV10TCL_RC_IN_RGB_B_INPUT_CONSTANT_COLOR1_NV                                        0x00020000
+#define    NV10TCL_RC_IN_RGB_B_INPUT_CONSTANT_COLOR0                                   0x00010000
+#define    NV10TCL_RC_IN_RGB_B_INPUT_CONSTANT_COLOR1                                   0x00020000
 #define    NV10TCL_RC_IN_RGB_B_INPUT_FOG                                               0x00030000
-#define    NV10TCL_RC_IN_RGB_B_INPUT_PRIMARY_COLOR_NV                                  0x00040000
-#define    NV10TCL_RC_IN_RGB_B_INPUT_SECONDARY_COLOR_NV                                        0x00050000
-#define    NV10TCL_RC_IN_RGB_B_INPUT_TEXTURE0_ARB                                      0x00080000
-#define    NV10TCL_RC_IN_RGB_B_INPUT_TEXTURE1_ARB                                      0x00090000
-#define    NV10TCL_RC_IN_RGB_B_INPUT_SPARE0_NV                                         0x000c0000
-#define    NV10TCL_RC_IN_RGB_B_INPUT_SPARE1_NV                                         0x000d0000
-#define    NV10TCL_RC_IN_RGB_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x000e0000
-#define    NV10TCL_RC_IN_RGB_B_INPUT_E_TIMES_F_NV                                      0x000f0000
-#define    NV10TCL_RC_IN_RGB_B_INPUT_TEXTURE2_ARB                                      0x000a0000
-#define    NV10TCL_RC_IN_RGB_B_INPUT_TEXTURE3_ARB                                      0x000b0000
+#define    NV10TCL_RC_IN_RGB_B_INPUT_PRIMARY_COLOR                                     0x00040000
+#define    NV10TCL_RC_IN_RGB_B_INPUT_SECONDARY_COLOR                                   0x00050000
+#define    NV10TCL_RC_IN_RGB_B_INPUT_TEXTURE0                                          0x00080000
+#define    NV10TCL_RC_IN_RGB_B_INPUT_TEXTURE1                                          0x00090000
+#define    NV10TCL_RC_IN_RGB_B_INPUT_SPARE0                                            0x000c0000
+#define    NV10TCL_RC_IN_RGB_B_INPUT_SPARE1                                            0x000d0000
+#define    NV10TCL_RC_IN_RGB_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x000e0000
+#define    NV10TCL_RC_IN_RGB_B_INPUT_E_TIMES_F                                         0x000f0000
+#define    NV10TCL_RC_IN_RGB_B_INPUT_TEXTURE2                                          0x000a0000
+#define    NV10TCL_RC_IN_RGB_B_INPUT_TEXTURE3                                          0x000b0000
 #define   NV10TCL_RC_IN_RGB_B_COMPONENT_USAGE                                          (1 << 20)
 #define    NV10TCL_RC_IN_RGB_B_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV10TCL_RC_IN_RGB_B_COMPONENT_USAGE_ALPHA                                   0x00100000
 #define   NV10TCL_RC_IN_RGB_B_MAPPING_SHIFT                                            21
 #define   NV10TCL_RC_IN_RGB_B_MAPPING_MASK                                             0x00e00000
-#define    NV10TCL_RC_IN_RGB_B_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV10TCL_RC_IN_RGB_B_MAPPING_UNSIGNED_INVERT_NV                              0x00200000
-#define    NV10TCL_RC_IN_RGB_B_MAPPING_EXPAND_NORMAL_NV                                        0x00400000
-#define    NV10TCL_RC_IN_RGB_B_MAPPING_EXPAND_NEGATE_NV                                        0x00600000
-#define    NV10TCL_RC_IN_RGB_B_MAPPING_HALF_BIAS_NORMAL_NV                             0x00800000
-#define    NV10TCL_RC_IN_RGB_B_MAPPING_HALF_BIAS_NEGATE_NV                             0x00a00000
-#define    NV10TCL_RC_IN_RGB_B_MAPPING_SIGNED_IDENTITY_NV                              0x00c00000
-#define    NV10TCL_RC_IN_RGB_B_MAPPING_SIGNED_NEGATE_NV                                        0x00e00000
+#define    NV10TCL_RC_IN_RGB_B_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV10TCL_RC_IN_RGB_B_MAPPING_UNSIGNED_INVERT                                 0x00200000
+#define    NV10TCL_RC_IN_RGB_B_MAPPING_EXPAND_NORMAL                                   0x00400000
+#define    NV10TCL_RC_IN_RGB_B_MAPPING_EXPAND_NEGATE                                   0x00600000
+#define    NV10TCL_RC_IN_RGB_B_MAPPING_HALF_BIAS_NORMAL                                        0x00800000
+#define    NV10TCL_RC_IN_RGB_B_MAPPING_HALF_BIAS_NEGATE                                        0x00a00000
+#define    NV10TCL_RC_IN_RGB_B_MAPPING_SIGNED_IDENTITY                                 0x00c00000
+#define    NV10TCL_RC_IN_RGB_B_MAPPING_SIGNED_NEGATE                                   0x00e00000
 #define   NV10TCL_RC_IN_RGB_A_INPUT_SHIFT                                              24
 #define   NV10TCL_RC_IN_RGB_A_INPUT_MASK                                               0x0f000000
 #define    NV10TCL_RC_IN_RGB_A_INPUT_ZERO                                              0x00000000
-#define    NV10TCL_RC_IN_RGB_A_INPUT_CONSTANT_COLOR0_NV                                        0x01000000
-#define    NV10TCL_RC_IN_RGB_A_INPUT_CONSTANT_COLOR1_NV                                        0x02000000
+#define    NV10TCL_RC_IN_RGB_A_INPUT_CONSTANT_COLOR0                                   0x01000000
+#define    NV10TCL_RC_IN_RGB_A_INPUT_CONSTANT_COLOR1                                   0x02000000
 #define    NV10TCL_RC_IN_RGB_A_INPUT_FOG                                               0x03000000
-#define    NV10TCL_RC_IN_RGB_A_INPUT_PRIMARY_COLOR_NV                                  0x04000000
-#define    NV10TCL_RC_IN_RGB_A_INPUT_SECONDARY_COLOR_NV                                        0x05000000
-#define    NV10TCL_RC_IN_RGB_A_INPUT_TEXTURE0_ARB                                      0x08000000
-#define    NV10TCL_RC_IN_RGB_A_INPUT_TEXTURE1_ARB                                      0x09000000
-#define    NV10TCL_RC_IN_RGB_A_INPUT_SPARE0_NV                                         0x0c000000
-#define    NV10TCL_RC_IN_RGB_A_INPUT_SPARE1_NV                                         0x0d000000
-#define    NV10TCL_RC_IN_RGB_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x0e000000
-#define    NV10TCL_RC_IN_RGB_A_INPUT_E_TIMES_F_NV                                      0x0f000000
-#define    NV10TCL_RC_IN_RGB_A_INPUT_TEXTURE2_ARB                                      0x0a000000
-#define    NV10TCL_RC_IN_RGB_A_INPUT_TEXTURE3_ARB                                      0x0b000000
+#define    NV10TCL_RC_IN_RGB_A_INPUT_PRIMARY_COLOR                                     0x04000000
+#define    NV10TCL_RC_IN_RGB_A_INPUT_SECONDARY_COLOR                                   0x05000000
+#define    NV10TCL_RC_IN_RGB_A_INPUT_TEXTURE0                                          0x08000000
+#define    NV10TCL_RC_IN_RGB_A_INPUT_TEXTURE1                                          0x09000000
+#define    NV10TCL_RC_IN_RGB_A_INPUT_SPARE0                                            0x0c000000
+#define    NV10TCL_RC_IN_RGB_A_INPUT_SPARE1                                            0x0d000000
+#define    NV10TCL_RC_IN_RGB_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x0e000000
+#define    NV10TCL_RC_IN_RGB_A_INPUT_E_TIMES_F                                         0x0f000000
+#define    NV10TCL_RC_IN_RGB_A_INPUT_TEXTURE2                                          0x0a000000
+#define    NV10TCL_RC_IN_RGB_A_INPUT_TEXTURE3                                          0x0b000000
 #define   NV10TCL_RC_IN_RGB_A_COMPONENT_USAGE                                          (1 << 28)
 #define    NV10TCL_RC_IN_RGB_A_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV10TCL_RC_IN_RGB_A_COMPONENT_USAGE_ALPHA                                   0x10000000
 #define   NV10TCL_RC_IN_RGB_A_MAPPING_SHIFT                                            29
 #define   NV10TCL_RC_IN_RGB_A_MAPPING_MASK                                             0xe0000000
-#define    NV10TCL_RC_IN_RGB_A_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV10TCL_RC_IN_RGB_A_MAPPING_UNSIGNED_INVERT_NV                              0x20000000
-#define    NV10TCL_RC_IN_RGB_A_MAPPING_EXPAND_NORMAL_NV                                        0x40000000
-#define    NV10TCL_RC_IN_RGB_A_MAPPING_EXPAND_NEGATE_NV                                        0x60000000
-#define    NV10TCL_RC_IN_RGB_A_MAPPING_HALF_BIAS_NORMAL_NV                             0x80000000
-#define    NV10TCL_RC_IN_RGB_A_MAPPING_HALF_BIAS_NEGATE_NV                             0xa0000000
-#define    NV10TCL_RC_IN_RGB_A_MAPPING_SIGNED_IDENTITY_NV                              0xc0000000
-#define    NV10TCL_RC_IN_RGB_A_MAPPING_SIGNED_NEGATE_NV                                        0xe0000000
+#define    NV10TCL_RC_IN_RGB_A_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV10TCL_RC_IN_RGB_A_MAPPING_UNSIGNED_INVERT                                 0x20000000
+#define    NV10TCL_RC_IN_RGB_A_MAPPING_EXPAND_NORMAL                                   0x40000000
+#define    NV10TCL_RC_IN_RGB_A_MAPPING_EXPAND_NEGATE                                   0x60000000
+#define    NV10TCL_RC_IN_RGB_A_MAPPING_HALF_BIAS_NORMAL                                        0x80000000
+#define    NV10TCL_RC_IN_RGB_A_MAPPING_HALF_BIAS_NEGATE                                        0xa0000000
+#define    NV10TCL_RC_IN_RGB_A_MAPPING_SIGNED_IDENTITY                                 0xc0000000
+#define    NV10TCL_RC_IN_RGB_A_MAPPING_SIGNED_NEGATE                                   0xe0000000
 #define  NV10TCL_RC_COLOR(x)                                                           (0x00000270+((x)*4))
 #define  NV10TCL_RC_COLOR__SIZE                                                                0x00000002
 #define   NV10TCL_RC_COLOR_B_SHIFT                                                     0
@@ -2131,333 +2157,333 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SHIFT                                         0
 #define   NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_MASK                                          0x0000000f
 #define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_ZERO                                         0x00000000
-#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR0_NV                           0x00000001
-#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR1_NV                           0x00000002
+#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR0                              0x00000001
+#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR1                              0x00000002
 #define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_FOG                                          0x00000003
-#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_PRIMARY_COLOR_NV                             0x00000004
-#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SECONDARY_COLOR_NV                           0x00000005
-#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE0_ARB                                 0x00000008
-#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE1_ARB                                 0x00000009
-#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE0_NV                                    0x0000000c
-#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE1_NV                                    0x0000000d
-#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR_NV               0x0000000e
-#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_E_TIMES_F_NV                                 0x0000000f
-#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE2_ARB                                 0x0000000a
-#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE3_ARB                                 0x0000000b
+#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_PRIMARY_COLOR                                        0x00000004
+#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SECONDARY_COLOR                              0x00000005
+#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE0                                     0x00000008
+#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE1                                     0x00000009
+#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE0                                       0x0000000c
+#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE1                                       0x0000000d
+#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR                  0x0000000e
+#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_E_TIMES_F                                    0x0000000f
+#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE2                                     0x0000000a
+#define    NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE3                                     0x0000000b
 #define   NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SHIFT                                         4
 #define   NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_MASK                                          0x000000f0
 #define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_ZERO                                         0x00000000
-#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR0_NV                           0x00000010
-#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR1_NV                           0x00000020
+#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR0                              0x00000010
+#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR1                              0x00000020
 #define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_FOG                                          0x00000030
-#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_PRIMARY_COLOR_NV                             0x00000040
-#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SECONDARY_COLOR_NV                           0x00000050
-#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE0_ARB                                 0x00000080
-#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE1_ARB                                 0x00000090
-#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE0_NV                                    0x000000c0
-#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE1_NV                                    0x000000d0
-#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR_NV               0x000000e0
-#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_E_TIMES_F_NV                                 0x000000f0
-#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE2_ARB                                 0x000000a0
-#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE3_ARB                                 0x000000b0
+#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_PRIMARY_COLOR                                        0x00000040
+#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SECONDARY_COLOR                              0x00000050
+#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE0                                     0x00000080
+#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE1                                     0x00000090
+#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE0                                       0x000000c0
+#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE1                                       0x000000d0
+#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR                  0x000000e0
+#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_E_TIMES_F                                    0x000000f0
+#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE2                                     0x000000a0
+#define    NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE3                                     0x000000b0
 #define   NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SHIFT                                                8
 #define   NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_MASK                                         0x00000f00
 #define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_ZERO                                                0x00000000
-#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR0_NV                          0x00000100
-#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR1_NV                          0x00000200
+#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR0                             0x00000100
+#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR1                             0x00000200
 #define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_FOG                                         0x00000300
-#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_PRIMARY_COLOR_NV                            0x00000400
-#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SECONDARY_COLOR_NV                          0x00000500
-#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE0_ARB                                        0x00000800
-#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE1_ARB                                        0x00000900
-#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0_NV                                   0x00000c00
-#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE1_NV                                   0x00000d00
-#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR_NV              0x00000e00
-#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_E_TIMES_F_NV                                        0x00000f00
-#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE2_ARB                                        0x00000a00
-#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE3_ARB                                        0x00000b00
+#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_PRIMARY_COLOR                               0x00000400
+#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SECONDARY_COLOR                             0x00000500
+#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE0                                    0x00000800
+#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE1                                    0x00000900
+#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0                                      0x00000c00
+#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE1                                      0x00000d00
+#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR                 0x00000e00
+#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_E_TIMES_F                                   0x00000f00
+#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE2                                    0x00000a00
+#define    NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE3                                    0x00000b00
 #define   NV10TCL_RC_OUT_ALPHA_CD_DOT_PRODUCT                                          (1 << 12)
 #define   NV10TCL_RC_OUT_ALPHA_AB_DOT_PRODUCT                                          (1 << 13)
 #define   NV10TCL_RC_OUT_ALPHA_MUX_SUM                                                 (1 << 14)
 #define   NV10TCL_RC_OUT_ALPHA_BIAS                                                    (1 << 15)
 #define    NV10TCL_RC_OUT_ALPHA_BIAS_NONE                                              0x00000000
-#define    NV10TCL_RC_OUT_ALPHA_BIAS_BIAS_BY_NEGATIVE_ONE_HALF_NV                      0x00008000
+#define    NV10TCL_RC_OUT_ALPHA_BIAS_BIAS_BY_NEGATIVE_ONE_HALF                         0x00008000
 #define   NV10TCL_RC_OUT_ALPHA_SCALE_SHIFT                                             17
 #define   NV10TCL_RC_OUT_ALPHA_SCALE_MASK                                              0x00000000
 #define    NV10TCL_RC_OUT_ALPHA_SCALE_NONE                                             0x00000000
-#define    NV10TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_TWO_NV                                  0x00020000
-#define    NV10TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_FOUR_NV                                 0x00040000
-#define    NV10TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_ONE_HALF_NV                             0x00060000
+#define    NV10TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_TWO                                     0x00020000
+#define    NV10TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_FOUR                                    0x00040000
+#define    NV10TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_ONE_HALF                                        0x00060000
 #define  NV10TCL_RC_OUT_RGB(x)                                                         (0x00000280+((x)*4))
 #define  NV10TCL_RC_OUT_RGB__SIZE                                                      0x00000002
 #define   NV10TCL_RC_OUT_RGB_CD_OUTPUT_SHIFT                                           0
 #define   NV10TCL_RC_OUT_RGB_CD_OUTPUT_MASK                                            0x0000000f
 #define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_ZERO                                           0x00000000
-#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR0_NV                             0x00000001
-#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR1_NV                             0x00000002
+#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR0                                        0x00000001
+#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR1                                        0x00000002
 #define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_FOG                                            0x00000003
-#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_PRIMARY_COLOR_NV                               0x00000004
-#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_SECONDARY_COLOR_NV                             0x00000005
-#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE0_ARB                                   0x00000008
-#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE1_ARB                                   0x00000009
-#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_SPARE0_NV                                      0x0000000c
-#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_SPARE1_NV                                      0x0000000d
-#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                 0x0000000e
-#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_E_TIMES_F_NV                                   0x0000000f
-#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE2_ARB                                   0x0000000a
-#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE3_ARB                                   0x0000000b
+#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_PRIMARY_COLOR                                  0x00000004
+#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_SECONDARY_COLOR                                        0x00000005
+#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE0                                       0x00000008
+#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE1                                       0x00000009
+#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_SPARE0                                         0x0000000c
+#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_SPARE1                                         0x0000000d
+#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR                    0x0000000e
+#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_E_TIMES_F                                      0x0000000f
+#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE2                                       0x0000000a
+#define    NV10TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE3                                       0x0000000b
 #define   NV10TCL_RC_OUT_RGB_AB_OUTPUT_SHIFT                                           4
 #define   NV10TCL_RC_OUT_RGB_AB_OUTPUT_MASK                                            0x000000f0
 #define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_ZERO                                           0x00000000
-#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR0_NV                             0x00000010
-#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR1_NV                             0x00000020
+#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR0                                        0x00000010
+#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR1                                        0x00000020
 #define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_FOG                                            0x00000030
-#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_PRIMARY_COLOR_NV                               0x00000040
-#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_SECONDARY_COLOR_NV                             0x00000050
-#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE0_ARB                                   0x00000080
-#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE1_ARB                                   0x00000090
-#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_SPARE0_NV                                      0x000000c0
-#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_SPARE1_NV                                      0x000000d0
-#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                 0x000000e0
-#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_E_TIMES_F_NV                                   0x000000f0
-#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE2_ARB                                   0x000000a0
-#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE3_ARB                                   0x000000b0
+#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_PRIMARY_COLOR                                  0x00000040
+#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_SECONDARY_COLOR                                        0x00000050
+#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE0                                       0x00000080
+#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE1                                       0x00000090
+#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_SPARE0                                         0x000000c0
+#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_SPARE1                                         0x000000d0
+#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR                    0x000000e0
+#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_E_TIMES_F                                      0x000000f0
+#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE2                                       0x000000a0
+#define    NV10TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE3                                       0x000000b0
 #define   NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SHIFT                                          8
 #define   NV10TCL_RC_OUT_RGB_SUM_OUTPUT_MASK                                           0x00000f00
 #define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_ZERO                                          0x00000000
-#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR0_NV                            0x00000100
-#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR1_NV                            0x00000200
+#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR0                               0x00000100
+#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR1                               0x00000200
 #define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_FOG                                           0x00000300
-#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_PRIMARY_COLOR_NV                              0x00000400
-#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SECONDARY_COLOR_NV                            0x00000500
-#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE0_ARB                                  0x00000800
-#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE1_ARB                                  0x00000900
-#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE0_NV                                     0x00000c00
-#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE1_NV                                     0x00000d00
-#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                        0x00000e00
-#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_E_TIMES_F_NV                                  0x00000f00
-#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE2_ARB                                  0x00000a00
-#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE3_ARB                                  0x00000b00
+#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_PRIMARY_COLOR                                 0x00000400
+#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SECONDARY_COLOR                               0x00000500
+#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE0                                      0x00000800
+#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE1                                      0x00000900
+#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE0                                                0x00000c00
+#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE1                                                0x00000d00
+#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR                   0x00000e00
+#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_E_TIMES_F                                     0x00000f00
+#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE2                                      0x00000a00
+#define    NV10TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE3                                      0x00000b00
 #define   NV10TCL_RC_OUT_RGB_CD_DOT_PRODUCT                                            (1 << 12)
 #define   NV10TCL_RC_OUT_RGB_AB_DOT_PRODUCT                                            (1 << 13)
 #define   NV10TCL_RC_OUT_RGB_MUX_SUM                                                   (1 << 14)
 #define   NV10TCL_RC_OUT_RGB_BIAS                                                      (1 << 15)
 #define    NV10TCL_RC_OUT_RGB_BIAS_NONE                                                        0x00000000
-#define    NV10TCL_RC_OUT_RGB_BIAS_BIAS_BY_NEGATIVE_ONE_HALF_NV                                0x00008000
+#define    NV10TCL_RC_OUT_RGB_BIAS_BIAS_BY_NEGATIVE_ONE_HALF                           0x00008000
 #define   NV10TCL_RC_OUT_RGB_SCALE_SHIFT                                               17
 #define   NV10TCL_RC_OUT_RGB_SCALE_MASK                                                        0x00000000
 #define    NV10TCL_RC_OUT_RGB_SCALE_NONE                                               0x00000000
-#define    NV10TCL_RC_OUT_RGB_SCALE_SCALE_BY_TWO_NV                                    0x00020000
-#define    NV10TCL_RC_OUT_RGB_SCALE_SCALE_BY_FOUR_NV                                   0x00040000
-#define    NV10TCL_RC_OUT_RGB_SCALE_SCALE_BY_ONE_HALF_NV                               0x00060000
+#define    NV10TCL_RC_OUT_RGB_SCALE_SCALE_BY_TWO                                       0x00020000
+#define    NV10TCL_RC_OUT_RGB_SCALE_SCALE_BY_FOUR                                      0x00040000
+#define    NV10TCL_RC_OUT_RGB_SCALE_SCALE_BY_ONE_HALF                                  0x00060000
 #define   NV10TCL_RC_OUT_RGB_OPERATION_SHIFT                                           27
 #define   NV10TCL_RC_OUT_RGB_OPERATION_MASK                                            0x38000000
 #define  NV10TCL_RC_FINAL0                                                             0x00000288
 #define   NV10TCL_RC_FINAL0_D_INPUT_SHIFT                                              0
 #define   NV10TCL_RC_FINAL0_D_INPUT_MASK                                               0x0000000f
 #define    NV10TCL_RC_FINAL0_D_INPUT_ZERO                                              0x00000000
-#define    NV10TCL_RC_FINAL0_D_INPUT_CONSTANT_COLOR0_NV                                        0x00000001
-#define    NV10TCL_RC_FINAL0_D_INPUT_CONSTANT_COLOR1_NV                                        0x00000002
+#define    NV10TCL_RC_FINAL0_D_INPUT_CONSTANT_COLOR0                                   0x00000001
+#define    NV10TCL_RC_FINAL0_D_INPUT_CONSTANT_COLOR1                                   0x00000002
 #define    NV10TCL_RC_FINAL0_D_INPUT_FOG                                               0x00000003
-#define    NV10TCL_RC_FINAL0_D_INPUT_PRIMARY_COLOR_NV                                  0x00000004
-#define    NV10TCL_RC_FINAL0_D_INPUT_SECONDARY_COLOR_NV                                        0x00000005
-#define    NV10TCL_RC_FINAL0_D_INPUT_TEXTURE0_ARB                                      0x00000008
-#define    NV10TCL_RC_FINAL0_D_INPUT_TEXTURE1_ARB                                      0x00000009
-#define    NV10TCL_RC_FINAL0_D_INPUT_SPARE0_NV                                         0x0000000c
-#define    NV10TCL_RC_FINAL0_D_INPUT_SPARE1_NV                                         0x0000000d
-#define    NV10TCL_RC_FINAL0_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x0000000e
-#define    NV10TCL_RC_FINAL0_D_INPUT_E_TIMES_F_NV                                      0x0000000f
-#define    NV10TCL_RC_FINAL0_D_INPUT_TEXTURE2_ARB                                      0x0000000a
-#define    NV10TCL_RC_FINAL0_D_INPUT_TEXTURE3_ARB                                      0x0000000b
+#define    NV10TCL_RC_FINAL0_D_INPUT_PRIMARY_COLOR                                     0x00000004
+#define    NV10TCL_RC_FINAL0_D_INPUT_SECONDARY_COLOR                                   0x00000005
+#define    NV10TCL_RC_FINAL0_D_INPUT_TEXTURE0                                          0x00000008
+#define    NV10TCL_RC_FINAL0_D_INPUT_TEXTURE1                                          0x00000009
+#define    NV10TCL_RC_FINAL0_D_INPUT_SPARE0                                            0x0000000c
+#define    NV10TCL_RC_FINAL0_D_INPUT_SPARE1                                            0x0000000d
+#define    NV10TCL_RC_FINAL0_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x0000000e
+#define    NV10TCL_RC_FINAL0_D_INPUT_E_TIMES_F                                         0x0000000f
+#define    NV10TCL_RC_FINAL0_D_INPUT_TEXTURE2                                          0x0000000a
+#define    NV10TCL_RC_FINAL0_D_INPUT_TEXTURE3                                          0x0000000b
 #define   NV10TCL_RC_FINAL0_D_COMPONENT_USAGE                                          (1 <<  4)
 #define    NV10TCL_RC_FINAL0_D_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV10TCL_RC_FINAL0_D_COMPONENT_USAGE_ALPHA                                   0x00000010
 #define   NV10TCL_RC_FINAL0_D_MAPPING_SHIFT                                            5
 #define   NV10TCL_RC_FINAL0_D_MAPPING_MASK                                             0x000000e0
-#define    NV10TCL_RC_FINAL0_D_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV10TCL_RC_FINAL0_D_MAPPING_UNSIGNED_INVERT_NV                              0x00000020
-#define    NV10TCL_RC_FINAL0_D_MAPPING_EXPAND_NORMAL_NV                                        0x00000040
-#define    NV10TCL_RC_FINAL0_D_MAPPING_EXPAND_NEGATE_NV                                        0x00000060
-#define    NV10TCL_RC_FINAL0_D_MAPPING_HALF_BIAS_NORMAL_NV                             0x00000080
-#define    NV10TCL_RC_FINAL0_D_MAPPING_HALF_BIAS_NEGATE_NV                             0x000000a0
-#define    NV10TCL_RC_FINAL0_D_MAPPING_SIGNED_IDENTITY_NV                              0x000000c0
-#define    NV10TCL_RC_FINAL0_D_MAPPING_SIGNED_NEGATE_NV                                        0x000000e0
+#define    NV10TCL_RC_FINAL0_D_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV10TCL_RC_FINAL0_D_MAPPING_UNSIGNED_INVERT                                 0x00000020
+#define    NV10TCL_RC_FINAL0_D_MAPPING_EXPAND_NORMAL                                   0x00000040
+#define    NV10TCL_RC_FINAL0_D_MAPPING_EXPAND_NEGATE                                   0x00000060
+#define    NV10TCL_RC_FINAL0_D_MAPPING_HALF_BIAS_NORMAL                                        0x00000080
+#define    NV10TCL_RC_FINAL0_D_MAPPING_HALF_BIAS_NEGATE                                        0x000000a0
+#define    NV10TCL_RC_FINAL0_D_MAPPING_SIGNED_IDENTITY                                 0x000000c0
+#define    NV10TCL_RC_FINAL0_D_MAPPING_SIGNED_NEGATE                                   0x000000e0
 #define   NV10TCL_RC_FINAL0_C_INPUT_SHIFT                                              8
 #define   NV10TCL_RC_FINAL0_C_INPUT_MASK                                               0x00000f00
 #define    NV10TCL_RC_FINAL0_C_INPUT_ZERO                                              0x00000000
-#define    NV10TCL_RC_FINAL0_C_INPUT_CONSTANT_COLOR0_NV                                        0x00000100
-#define    NV10TCL_RC_FINAL0_C_INPUT_CONSTANT_COLOR1_NV                                        0x00000200
+#define    NV10TCL_RC_FINAL0_C_INPUT_CONSTANT_COLOR0                                   0x00000100
+#define    NV10TCL_RC_FINAL0_C_INPUT_CONSTANT_COLOR1                                   0x00000200
 #define    NV10TCL_RC_FINAL0_C_INPUT_FOG                                               0x00000300
-#define    NV10TCL_RC_FINAL0_C_INPUT_PRIMARY_COLOR_NV                                  0x00000400
-#define    NV10TCL_RC_FINAL0_C_INPUT_SECONDARY_COLOR_NV                                        0x00000500
-#define    NV10TCL_RC_FINAL0_C_INPUT_TEXTURE0_ARB                                      0x00000800
-#define    NV10TCL_RC_FINAL0_C_INPUT_TEXTURE1_ARB                                      0x00000900
-#define    NV10TCL_RC_FINAL0_C_INPUT_SPARE0_NV                                         0x00000c00
-#define    NV10TCL_RC_FINAL0_C_INPUT_SPARE1_NV                                         0x00000d00
-#define    NV10TCL_RC_FINAL0_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x00000e00
-#define    NV10TCL_RC_FINAL0_C_INPUT_E_TIMES_F_NV                                      0x00000f00
-#define    NV10TCL_RC_FINAL0_C_INPUT_TEXTURE2_ARB                                      0x00000a00
-#define    NV10TCL_RC_FINAL0_C_INPUT_TEXTURE3_ARB                                      0x00000b00
+#define    NV10TCL_RC_FINAL0_C_INPUT_PRIMARY_COLOR                                     0x00000400
+#define    NV10TCL_RC_FINAL0_C_INPUT_SECONDARY_COLOR                                   0x00000500
+#define    NV10TCL_RC_FINAL0_C_INPUT_TEXTURE0                                          0x00000800
+#define    NV10TCL_RC_FINAL0_C_INPUT_TEXTURE1                                          0x00000900
+#define    NV10TCL_RC_FINAL0_C_INPUT_SPARE0                                            0x00000c00
+#define    NV10TCL_RC_FINAL0_C_INPUT_SPARE1                                            0x00000d00
+#define    NV10TCL_RC_FINAL0_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x00000e00
+#define    NV10TCL_RC_FINAL0_C_INPUT_E_TIMES_F                                         0x00000f00
+#define    NV10TCL_RC_FINAL0_C_INPUT_TEXTURE2                                          0x00000a00
+#define    NV10TCL_RC_FINAL0_C_INPUT_TEXTURE3                                          0x00000b00
 #define   NV10TCL_RC_FINAL0_C_COMPONENT_USAGE                                          (1 << 12)
 #define    NV10TCL_RC_FINAL0_C_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV10TCL_RC_FINAL0_C_COMPONENT_USAGE_ALPHA                                   0x00001000
 #define   NV10TCL_RC_FINAL0_C_MAPPING_SHIFT                                            13
 #define   NV10TCL_RC_FINAL0_C_MAPPING_MASK                                             0x0000e000
-#define    NV10TCL_RC_FINAL0_C_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV10TCL_RC_FINAL0_C_MAPPING_UNSIGNED_INVERT_NV                              0x00002000
-#define    NV10TCL_RC_FINAL0_C_MAPPING_EXPAND_NORMAL_NV                                        0x00004000
-#define    NV10TCL_RC_FINAL0_C_MAPPING_EXPAND_NEGATE_NV                                        0x00006000
-#define    NV10TCL_RC_FINAL0_C_MAPPING_HALF_BIAS_NORMAL_NV                             0x00008000
-#define    NV10TCL_RC_FINAL0_C_MAPPING_HALF_BIAS_NEGATE_NV                             0x0000a000
-#define    NV10TCL_RC_FINAL0_C_MAPPING_SIGNED_IDENTITY_NV                              0x0000c000
-#define    NV10TCL_RC_FINAL0_C_MAPPING_SIGNED_NEGATE_NV                                        0x0000e000
+#define    NV10TCL_RC_FINAL0_C_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV10TCL_RC_FINAL0_C_MAPPING_UNSIGNED_INVERT                                 0x00002000
+#define    NV10TCL_RC_FINAL0_C_MAPPING_EXPAND_NORMAL                                   0x00004000
+#define    NV10TCL_RC_FINAL0_C_MAPPING_EXPAND_NEGATE                                   0x00006000
+#define    NV10TCL_RC_FINAL0_C_MAPPING_HALF_BIAS_NORMAL                                        0x00008000
+#define    NV10TCL_RC_FINAL0_C_MAPPING_HALF_BIAS_NEGATE                                        0x0000a000
+#define    NV10TCL_RC_FINAL0_C_MAPPING_SIGNED_IDENTITY                                 0x0000c000
+#define    NV10TCL_RC_FINAL0_C_MAPPING_SIGNED_NEGATE                                   0x0000e000
 #define   NV10TCL_RC_FINAL0_B_INPUT_SHIFT                                              16
 #define   NV10TCL_RC_FINAL0_B_INPUT_MASK                                               0x000f0000
 #define    NV10TCL_RC_FINAL0_B_INPUT_ZERO                                              0x00000000
-#define    NV10TCL_RC_FINAL0_B_INPUT_CONSTANT_COLOR0_NV                                        0x00010000
-#define    NV10TCL_RC_FINAL0_B_INPUT_CONSTANT_COLOR1_NV                                        0x00020000
+#define    NV10TCL_RC_FINAL0_B_INPUT_CONSTANT_COLOR0                                   0x00010000
+#define    NV10TCL_RC_FINAL0_B_INPUT_CONSTANT_COLOR1                                   0x00020000
 #define    NV10TCL_RC_FINAL0_B_INPUT_FOG                                               0x00030000
-#define    NV10TCL_RC_FINAL0_B_INPUT_PRIMARY_COLOR_NV                                  0x00040000
-#define    NV10TCL_RC_FINAL0_B_INPUT_SECONDARY_COLOR_NV                                        0x00050000
-#define    NV10TCL_RC_FINAL0_B_INPUT_TEXTURE0_ARB                                      0x00080000
-#define    NV10TCL_RC_FINAL0_B_INPUT_TEXTURE1_ARB                                      0x00090000
-#define    NV10TCL_RC_FINAL0_B_INPUT_SPARE0_NV                                         0x000c0000
-#define    NV10TCL_RC_FINAL0_B_INPUT_SPARE1_NV                                         0x000d0000
-#define    NV10TCL_RC_FINAL0_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x000e0000
-#define    NV10TCL_RC_FINAL0_B_INPUT_E_TIMES_F_NV                                      0x000f0000
-#define    NV10TCL_RC_FINAL0_B_INPUT_TEXTURE2_ARB                                      0x000a0000
-#define    NV10TCL_RC_FINAL0_B_INPUT_TEXTURE3_ARB                                      0x000b0000
+#define    NV10TCL_RC_FINAL0_B_INPUT_PRIMARY_COLOR                                     0x00040000
+#define    NV10TCL_RC_FINAL0_B_INPUT_SECONDARY_COLOR                                   0x00050000
+#define    NV10TCL_RC_FINAL0_B_INPUT_TEXTURE0                                          0x00080000
+#define    NV10TCL_RC_FINAL0_B_INPUT_TEXTURE1                                          0x00090000
+#define    NV10TCL_RC_FINAL0_B_INPUT_SPARE0                                            0x000c0000
+#define    NV10TCL_RC_FINAL0_B_INPUT_SPARE1                                            0x000d0000
+#define    NV10TCL_RC_FINAL0_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x000e0000
+#define    NV10TCL_RC_FINAL0_B_INPUT_E_TIMES_F                                         0x000f0000
+#define    NV10TCL_RC_FINAL0_B_INPUT_TEXTURE2                                          0x000a0000
+#define    NV10TCL_RC_FINAL0_B_INPUT_TEXTURE3                                          0x000b0000
 #define   NV10TCL_RC_FINAL0_B_COMPONENT_USAGE                                          (1 << 20)
 #define    NV10TCL_RC_FINAL0_B_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV10TCL_RC_FINAL0_B_COMPONENT_USAGE_ALPHA                                   0x00100000
 #define   NV10TCL_RC_FINAL0_B_MAPPING_SHIFT                                            21
 #define   NV10TCL_RC_FINAL0_B_MAPPING_MASK                                             0x00e00000
-#define    NV10TCL_RC_FINAL0_B_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV10TCL_RC_FINAL0_B_MAPPING_UNSIGNED_INVERT_NV                              0x00200000
-#define    NV10TCL_RC_FINAL0_B_MAPPING_EXPAND_NORMAL_NV                                        0x00400000
-#define    NV10TCL_RC_FINAL0_B_MAPPING_EXPAND_NEGATE_NV                                        0x00600000
-#define    NV10TCL_RC_FINAL0_B_MAPPING_HALF_BIAS_NORMAL_NV                             0x00800000
-#define    NV10TCL_RC_FINAL0_B_MAPPING_HALF_BIAS_NEGATE_NV                             0x00a00000
-#define    NV10TCL_RC_FINAL0_B_MAPPING_SIGNED_IDENTITY_NV                              0x00c00000
-#define    NV10TCL_RC_FINAL0_B_MAPPING_SIGNED_NEGATE_NV                                        0x00e00000
+#define    NV10TCL_RC_FINAL0_B_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV10TCL_RC_FINAL0_B_MAPPING_UNSIGNED_INVERT                                 0x00200000
+#define    NV10TCL_RC_FINAL0_B_MAPPING_EXPAND_NORMAL                                   0x00400000
+#define    NV10TCL_RC_FINAL0_B_MAPPING_EXPAND_NEGATE                                   0x00600000
+#define    NV10TCL_RC_FINAL0_B_MAPPING_HALF_BIAS_NORMAL                                        0x00800000
+#define    NV10TCL_RC_FINAL0_B_MAPPING_HALF_BIAS_NEGATE                                        0x00a00000
+#define    NV10TCL_RC_FINAL0_B_MAPPING_SIGNED_IDENTITY                                 0x00c00000
+#define    NV10TCL_RC_FINAL0_B_MAPPING_SIGNED_NEGATE                                   0x00e00000
 #define   NV10TCL_RC_FINAL0_A_INPUT_SHIFT                                              24
 #define   NV10TCL_RC_FINAL0_A_INPUT_MASK                                               0x0f000000
 #define    NV10TCL_RC_FINAL0_A_INPUT_ZERO                                              0x00000000
-#define    NV10TCL_RC_FINAL0_A_INPUT_CONSTANT_COLOR0_NV                                        0x01000000
-#define    NV10TCL_RC_FINAL0_A_INPUT_CONSTANT_COLOR1_NV                                        0x02000000
+#define    NV10TCL_RC_FINAL0_A_INPUT_CONSTANT_COLOR0                                   0x01000000
+#define    NV10TCL_RC_FINAL0_A_INPUT_CONSTANT_COLOR1                                   0x02000000
 #define    NV10TCL_RC_FINAL0_A_INPUT_FOG                                               0x03000000
-#define    NV10TCL_RC_FINAL0_A_INPUT_PRIMARY_COLOR_NV                                  0x04000000
-#define    NV10TCL_RC_FINAL0_A_INPUT_SECONDARY_COLOR_NV                                        0x05000000
-#define    NV10TCL_RC_FINAL0_A_INPUT_TEXTURE0_ARB                                      0x08000000
-#define    NV10TCL_RC_FINAL0_A_INPUT_TEXTURE1_ARB                                      0x09000000
-#define    NV10TCL_RC_FINAL0_A_INPUT_SPARE0_NV                                         0x0c000000
-#define    NV10TCL_RC_FINAL0_A_INPUT_SPARE1_NV                                         0x0d000000
-#define    NV10TCL_RC_FINAL0_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x0e000000
-#define    NV10TCL_RC_FINAL0_A_INPUT_E_TIMES_F_NV                                      0x0f000000
-#define    NV10TCL_RC_FINAL0_A_INPUT_TEXTURE2_ARB                                      0x0a000000
-#define    NV10TCL_RC_FINAL0_A_INPUT_TEXTURE3_ARB                                      0x0b000000
+#define    NV10TCL_RC_FINAL0_A_INPUT_PRIMARY_COLOR                                     0x04000000
+#define    NV10TCL_RC_FINAL0_A_INPUT_SECONDARY_COLOR                                   0x05000000
+#define    NV10TCL_RC_FINAL0_A_INPUT_TEXTURE0                                          0x08000000
+#define    NV10TCL_RC_FINAL0_A_INPUT_TEXTURE1                                          0x09000000
+#define    NV10TCL_RC_FINAL0_A_INPUT_SPARE0                                            0x0c000000
+#define    NV10TCL_RC_FINAL0_A_INPUT_SPARE1                                            0x0d000000
+#define    NV10TCL_RC_FINAL0_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x0e000000
+#define    NV10TCL_RC_FINAL0_A_INPUT_E_TIMES_F                                         0x0f000000
+#define    NV10TCL_RC_FINAL0_A_INPUT_TEXTURE2                                          0x0a000000
+#define    NV10TCL_RC_FINAL0_A_INPUT_TEXTURE3                                          0x0b000000
 #define   NV10TCL_RC_FINAL0_A_COMPONENT_USAGE                                          (1 << 28)
 #define    NV10TCL_RC_FINAL0_A_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV10TCL_RC_FINAL0_A_COMPONENT_USAGE_ALPHA                                   0x10000000
 #define   NV10TCL_RC_FINAL0_A_MAPPING_SHIFT                                            29
 #define   NV10TCL_RC_FINAL0_A_MAPPING_MASK                                             0xe0000000
-#define    NV10TCL_RC_FINAL0_A_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV10TCL_RC_FINAL0_A_MAPPING_UNSIGNED_INVERT_NV                              0x20000000
-#define    NV10TCL_RC_FINAL0_A_MAPPING_EXPAND_NORMAL_NV                                        0x40000000
-#define    NV10TCL_RC_FINAL0_A_MAPPING_EXPAND_NEGATE_NV                                        0x60000000
-#define    NV10TCL_RC_FINAL0_A_MAPPING_HALF_BIAS_NORMAL_NV                             0x80000000
-#define    NV10TCL_RC_FINAL0_A_MAPPING_HALF_BIAS_NEGATE_NV                             0xa0000000
-#define    NV10TCL_RC_FINAL0_A_MAPPING_SIGNED_IDENTITY_NV                              0xc0000000
-#define    NV10TCL_RC_FINAL0_A_MAPPING_SIGNED_NEGATE_NV                                        0xe0000000
+#define    NV10TCL_RC_FINAL0_A_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV10TCL_RC_FINAL0_A_MAPPING_UNSIGNED_INVERT                                 0x20000000
+#define    NV10TCL_RC_FINAL0_A_MAPPING_EXPAND_NORMAL                                   0x40000000
+#define    NV10TCL_RC_FINAL0_A_MAPPING_EXPAND_NEGATE                                   0x60000000
+#define    NV10TCL_RC_FINAL0_A_MAPPING_HALF_BIAS_NORMAL                                        0x80000000
+#define    NV10TCL_RC_FINAL0_A_MAPPING_HALF_BIAS_NEGATE                                        0xa0000000
+#define    NV10TCL_RC_FINAL0_A_MAPPING_SIGNED_IDENTITY                                 0xc0000000
+#define    NV10TCL_RC_FINAL0_A_MAPPING_SIGNED_NEGATE                                   0xe0000000
 #define  NV10TCL_RC_FINAL1                                                             0x0000028c
 #define   NV10TCL_RC_FINAL1_COLOR_SUM_CLAMP                                            (1 <<  7)
 #define   NV10TCL_RC_FINAL1_G_INPUT_SHIFT                                              8
 #define   NV10TCL_RC_FINAL1_G_INPUT_MASK                                               0x00000f00
 #define    NV10TCL_RC_FINAL1_G_INPUT_ZERO                                              0x00000000
-#define    NV10TCL_RC_FINAL1_G_INPUT_CONSTANT_COLOR0_NV                                        0x00000100
-#define    NV10TCL_RC_FINAL1_G_INPUT_CONSTANT_COLOR1_NV                                        0x00000200
+#define    NV10TCL_RC_FINAL1_G_INPUT_CONSTANT_COLOR0                                   0x00000100
+#define    NV10TCL_RC_FINAL1_G_INPUT_CONSTANT_COLOR1                                   0x00000200
 #define    NV10TCL_RC_FINAL1_G_INPUT_FOG                                               0x00000300
-#define    NV10TCL_RC_FINAL1_G_INPUT_PRIMARY_COLOR_NV                                  0x00000400
-#define    NV10TCL_RC_FINAL1_G_INPUT_SECONDARY_COLOR_NV                                        0x00000500
-#define    NV10TCL_RC_FINAL1_G_INPUT_TEXTURE0_ARB                                      0x00000800
-#define    NV10TCL_RC_FINAL1_G_INPUT_TEXTURE1_ARB                                      0x00000900
-#define    NV10TCL_RC_FINAL1_G_INPUT_SPARE0_NV                                         0x00000c00
-#define    NV10TCL_RC_FINAL1_G_INPUT_SPARE1_NV                                         0x00000d00
-#define    NV10TCL_RC_FINAL1_G_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x00000e00
-#define    NV10TCL_RC_FINAL1_G_INPUT_E_TIMES_F_NV                                      0x00000f00
-#define    NV10TCL_RC_FINAL1_G_INPUT_TEXTURE2_ARB                                      0x00000a00
-#define    NV10TCL_RC_FINAL1_G_INPUT_TEXTURE3_ARB                                      0x00000b00
+#define    NV10TCL_RC_FINAL1_G_INPUT_PRIMARY_COLOR                                     0x00000400
+#define    NV10TCL_RC_FINAL1_G_INPUT_SECONDARY_COLOR                                   0x00000500
+#define    NV10TCL_RC_FINAL1_G_INPUT_TEXTURE0                                          0x00000800
+#define    NV10TCL_RC_FINAL1_G_INPUT_TEXTURE1                                          0x00000900
+#define    NV10TCL_RC_FINAL1_G_INPUT_SPARE0                                            0x00000c00
+#define    NV10TCL_RC_FINAL1_G_INPUT_SPARE1                                            0x00000d00
+#define    NV10TCL_RC_FINAL1_G_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x00000e00
+#define    NV10TCL_RC_FINAL1_G_INPUT_E_TIMES_F                                         0x00000f00
+#define    NV10TCL_RC_FINAL1_G_INPUT_TEXTURE2                                          0x00000a00
+#define    NV10TCL_RC_FINAL1_G_INPUT_TEXTURE3                                          0x00000b00
 #define   NV10TCL_RC_FINAL1_G_COMPONENT_USAGE                                          (1 << 12)
 #define    NV10TCL_RC_FINAL1_G_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV10TCL_RC_FINAL1_G_COMPONENT_USAGE_ALPHA                                   0x00001000
 #define   NV10TCL_RC_FINAL1_G_MAPPING_SHIFT                                            13
 #define   NV10TCL_RC_FINAL1_G_MAPPING_MASK                                             0x0000e000
-#define    NV10TCL_RC_FINAL1_G_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV10TCL_RC_FINAL1_G_MAPPING_UNSIGNED_INVERT_NV                              0x00002000
-#define    NV10TCL_RC_FINAL1_G_MAPPING_EXPAND_NORMAL_NV                                        0x00004000
-#define    NV10TCL_RC_FINAL1_G_MAPPING_EXPAND_NEGATE_NV                                        0x00006000
-#define    NV10TCL_RC_FINAL1_G_MAPPING_HALF_BIAS_NORMAL_NV                             0x00008000
-#define    NV10TCL_RC_FINAL1_G_MAPPING_HALF_BIAS_NEGATE_NV                             0x0000a000
-#define    NV10TCL_RC_FINAL1_G_MAPPING_SIGNED_IDENTITY_NV                              0x0000c000
-#define    NV10TCL_RC_FINAL1_G_MAPPING_SIGNED_NEGATE_NV                                        0x0000e000
+#define    NV10TCL_RC_FINAL1_G_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV10TCL_RC_FINAL1_G_MAPPING_UNSIGNED_INVERT                                 0x00002000
+#define    NV10TCL_RC_FINAL1_G_MAPPING_EXPAND_NORMAL                                   0x00004000
+#define    NV10TCL_RC_FINAL1_G_MAPPING_EXPAND_NEGATE                                   0x00006000
+#define    NV10TCL_RC_FINAL1_G_MAPPING_HALF_BIAS_NORMAL                                        0x00008000
+#define    NV10TCL_RC_FINAL1_G_MAPPING_HALF_BIAS_NEGATE                                        0x0000a000
+#define    NV10TCL_RC_FINAL1_G_MAPPING_SIGNED_IDENTITY                                 0x0000c000
+#define    NV10TCL_RC_FINAL1_G_MAPPING_SIGNED_NEGATE                                   0x0000e000
 #define   NV10TCL_RC_FINAL1_F_INPUT_SHIFT                                              16
 #define   NV10TCL_RC_FINAL1_F_INPUT_MASK                                               0x000f0000
 #define    NV10TCL_RC_FINAL1_F_INPUT_ZERO                                              0x00000000
-#define    NV10TCL_RC_FINAL1_F_INPUT_CONSTANT_COLOR0_NV                                        0x00010000
-#define    NV10TCL_RC_FINAL1_F_INPUT_CONSTANT_COLOR1_NV                                        0x00020000
+#define    NV10TCL_RC_FINAL1_F_INPUT_CONSTANT_COLOR0                                   0x00010000
+#define    NV10TCL_RC_FINAL1_F_INPUT_CONSTANT_COLOR1                                   0x00020000
 #define    NV10TCL_RC_FINAL1_F_INPUT_FOG                                               0x00030000
-#define    NV10TCL_RC_FINAL1_F_INPUT_PRIMARY_COLOR_NV                                  0x00040000
-#define    NV10TCL_RC_FINAL1_F_INPUT_SECONDARY_COLOR_NV                                        0x00050000
-#define    NV10TCL_RC_FINAL1_F_INPUT_TEXTURE0_ARB                                      0x00080000
-#define    NV10TCL_RC_FINAL1_F_INPUT_TEXTURE1_ARB                                      0x00090000
-#define    NV10TCL_RC_FINAL1_F_INPUT_SPARE0_NV                                         0x000c0000
-#define    NV10TCL_RC_FINAL1_F_INPUT_SPARE1_NV                                         0x000d0000
-#define    NV10TCL_RC_FINAL1_F_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x000e0000
-#define    NV10TCL_RC_FINAL1_F_INPUT_E_TIMES_F_NV                                      0x000f0000
-#define    NV10TCL_RC_FINAL1_F_INPUT_TEXTURE2_ARB                                      0x000a0000
-#define    NV10TCL_RC_FINAL1_F_INPUT_TEXTURE3_ARB                                      0x000b0000
+#define    NV10TCL_RC_FINAL1_F_INPUT_PRIMARY_COLOR                                     0x00040000
+#define    NV10TCL_RC_FINAL1_F_INPUT_SECONDARY_COLOR                                   0x00050000
+#define    NV10TCL_RC_FINAL1_F_INPUT_TEXTURE0                                          0x00080000
+#define    NV10TCL_RC_FINAL1_F_INPUT_TEXTURE1                                          0x00090000
+#define    NV10TCL_RC_FINAL1_F_INPUT_SPARE0                                            0x000c0000
+#define    NV10TCL_RC_FINAL1_F_INPUT_SPARE1                                            0x000d0000
+#define    NV10TCL_RC_FINAL1_F_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x000e0000
+#define    NV10TCL_RC_FINAL1_F_INPUT_E_TIMES_F                                         0x000f0000
+#define    NV10TCL_RC_FINAL1_F_INPUT_TEXTURE2                                          0x000a0000
+#define    NV10TCL_RC_FINAL1_F_INPUT_TEXTURE3                                          0x000b0000
 #define   NV10TCL_RC_FINAL1_F_COMPONENT_USAGE                                          (1 << 20)
 #define    NV10TCL_RC_FINAL1_F_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV10TCL_RC_FINAL1_F_COMPONENT_USAGE_ALPHA                                   0x00100000
 #define   NV10TCL_RC_FINAL1_F_MAPPING_SHIFT                                            21
 #define   NV10TCL_RC_FINAL1_F_MAPPING_MASK                                             0x00e00000
-#define    NV10TCL_RC_FINAL1_F_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV10TCL_RC_FINAL1_F_MAPPING_UNSIGNED_INVERT_NV                              0x00200000
-#define    NV10TCL_RC_FINAL1_F_MAPPING_EXPAND_NORMAL_NV                                        0x00400000
-#define    NV10TCL_RC_FINAL1_F_MAPPING_EXPAND_NEGATE_NV                                        0x00600000
-#define    NV10TCL_RC_FINAL1_F_MAPPING_HALF_BIAS_NORMAL_NV                             0x00800000
-#define    NV10TCL_RC_FINAL1_F_MAPPING_HALF_BIAS_NEGATE_NV                             0x00a00000
-#define    NV10TCL_RC_FINAL1_F_MAPPING_SIGNED_IDENTITY_NV                              0x00c00000
-#define    NV10TCL_RC_FINAL1_F_MAPPING_SIGNED_NEGATE_NV                                        0x00e00000
+#define    NV10TCL_RC_FINAL1_F_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV10TCL_RC_FINAL1_F_MAPPING_UNSIGNED_INVERT                                 0x00200000
+#define    NV10TCL_RC_FINAL1_F_MAPPING_EXPAND_NORMAL                                   0x00400000
+#define    NV10TCL_RC_FINAL1_F_MAPPING_EXPAND_NEGATE                                   0x00600000
+#define    NV10TCL_RC_FINAL1_F_MAPPING_HALF_BIAS_NORMAL                                        0x00800000
+#define    NV10TCL_RC_FINAL1_F_MAPPING_HALF_BIAS_NEGATE                                        0x00a00000
+#define    NV10TCL_RC_FINAL1_F_MAPPING_SIGNED_IDENTITY                                 0x00c00000
+#define    NV10TCL_RC_FINAL1_F_MAPPING_SIGNED_NEGATE                                   0x00e00000
 #define   NV10TCL_RC_FINAL1_E_INPUT_SHIFT                                              24
 #define   NV10TCL_RC_FINAL1_E_INPUT_MASK                                               0x0f000000
 #define    NV10TCL_RC_FINAL1_E_INPUT_ZERO                                              0x00000000
-#define    NV10TCL_RC_FINAL1_E_INPUT_CONSTANT_COLOR0_NV                                        0x01000000
-#define    NV10TCL_RC_FINAL1_E_INPUT_CONSTANT_COLOR1_NV                                        0x02000000
+#define    NV10TCL_RC_FINAL1_E_INPUT_CONSTANT_COLOR0                                   0x01000000
+#define    NV10TCL_RC_FINAL1_E_INPUT_CONSTANT_COLOR1                                   0x02000000
 #define    NV10TCL_RC_FINAL1_E_INPUT_FOG                                               0x03000000
-#define    NV10TCL_RC_FINAL1_E_INPUT_PRIMARY_COLOR_NV                                  0x04000000
-#define    NV10TCL_RC_FINAL1_E_INPUT_SECONDARY_COLOR_NV                                        0x05000000
-#define    NV10TCL_RC_FINAL1_E_INPUT_TEXTURE0_ARB                                      0x08000000
-#define    NV10TCL_RC_FINAL1_E_INPUT_TEXTURE1_ARB                                      0x09000000
-#define    NV10TCL_RC_FINAL1_E_INPUT_SPARE0_NV                                         0x0c000000
-#define    NV10TCL_RC_FINAL1_E_INPUT_SPARE1_NV                                         0x0d000000
-#define    NV10TCL_RC_FINAL1_E_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x0e000000
-#define    NV10TCL_RC_FINAL1_E_INPUT_E_TIMES_F_NV                                      0x0f000000
-#define    NV10TCL_RC_FINAL1_E_INPUT_TEXTURE2_ARB                                      0x0a000000
-#define    NV10TCL_RC_FINAL1_E_INPUT_TEXTURE3_ARB                                      0x0b000000
+#define    NV10TCL_RC_FINAL1_E_INPUT_PRIMARY_COLOR                                     0x04000000
+#define    NV10TCL_RC_FINAL1_E_INPUT_SECONDARY_COLOR                                   0x05000000
+#define    NV10TCL_RC_FINAL1_E_INPUT_TEXTURE0                                          0x08000000
+#define    NV10TCL_RC_FINAL1_E_INPUT_TEXTURE1                                          0x09000000
+#define    NV10TCL_RC_FINAL1_E_INPUT_SPARE0                                            0x0c000000
+#define    NV10TCL_RC_FINAL1_E_INPUT_SPARE1                                            0x0d000000
+#define    NV10TCL_RC_FINAL1_E_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x0e000000
+#define    NV10TCL_RC_FINAL1_E_INPUT_E_TIMES_F                                         0x0f000000
+#define    NV10TCL_RC_FINAL1_E_INPUT_TEXTURE2                                          0x0a000000
+#define    NV10TCL_RC_FINAL1_E_INPUT_TEXTURE3                                          0x0b000000
 #define   NV10TCL_RC_FINAL1_E_COMPONENT_USAGE                                          (1 << 28)
 #define    NV10TCL_RC_FINAL1_E_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV10TCL_RC_FINAL1_E_COMPONENT_USAGE_ALPHA                                   0x10000000
 #define   NV10TCL_RC_FINAL1_E_MAPPING_SHIFT                                            29
 #define   NV10TCL_RC_FINAL1_E_MAPPING_MASK                                             0xe0000000
-#define    NV10TCL_RC_FINAL1_E_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV10TCL_RC_FINAL1_E_MAPPING_UNSIGNED_INVERT_NV                              0x20000000
-#define    NV10TCL_RC_FINAL1_E_MAPPING_EXPAND_NORMAL_NV                                        0x40000000
-#define    NV10TCL_RC_FINAL1_E_MAPPING_EXPAND_NEGATE_NV                                        0x60000000
-#define    NV10TCL_RC_FINAL1_E_MAPPING_HALF_BIAS_NORMAL_NV                             0x80000000
-#define    NV10TCL_RC_FINAL1_E_MAPPING_HALF_BIAS_NEGATE_NV                             0xa0000000
-#define    NV10TCL_RC_FINAL1_E_MAPPING_SIGNED_IDENTITY_NV                              0xc0000000
-#define    NV10TCL_RC_FINAL1_E_MAPPING_SIGNED_NEGATE_NV                                        0xe0000000
+#define    NV10TCL_RC_FINAL1_E_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV10TCL_RC_FINAL1_E_MAPPING_UNSIGNED_INVERT                                 0x20000000
+#define    NV10TCL_RC_FINAL1_E_MAPPING_EXPAND_NORMAL                                   0x40000000
+#define    NV10TCL_RC_FINAL1_E_MAPPING_EXPAND_NEGATE                                   0x60000000
+#define    NV10TCL_RC_FINAL1_E_MAPPING_HALF_BIAS_NORMAL                                        0x80000000
+#define    NV10TCL_RC_FINAL1_E_MAPPING_HALF_BIAS_NEGATE                                        0xa0000000
+#define    NV10TCL_RC_FINAL1_E_MAPPING_SIGNED_IDENTITY                                 0xc0000000
+#define    NV10TCL_RC_FINAL1_E_MAPPING_SIGNED_NEGATE                                   0xe0000000
 #define  NV10TCL_LIGHT_MODEL                                                           0x00000294
 #define   NV10TCL_LIGHT_MODEL_COLOR_CONTROL                                            (1 <<  1)
 #define   NV10TCL_LIGHT_MODEL_LOCAL_VIEWER                                             (1 << 16)
@@ -2474,8 +2500,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV10TCL_FOG_MODE_LINEAR_2                                                    0x00002601
 #define  NV10TCL_FOG_COORD_DIST                                                                0x000002a0
 #define   NV10TCL_FOG_COORD_DIST_COORD_FALSE                                           0x00000000
-#define   NV10TCL_FOG_COORD_DIST_COORD_FRAGMENT_DEPTH_DISTANCE_EYE_RADIAL_NV           0x00000001
-#define   NV10TCL_FOG_COORD_DIST_COORD_FRAGMENT_DEPTH_DISTANCE_EYE_PLANE_ABSOLUTE_NV   0x00000002
+#define   NV10TCL_FOG_COORD_DIST_COORD_FRAGMENT_DEPTH_DISTANCE_EYE_RADIAL              0x00000001
+#define   NV10TCL_FOG_COORD_DIST_COORD_FRAGMENT_DEPTH_DISTANCE_EYE_PLANE_ABSOLUTE      0x00000002
 #define   NV10TCL_FOG_COORD_DIST_COORD_FOG                                             0x00000003
 #define  NV10TCL_FOG_ENABLE                                                            0x000002a4
 #define  NV10TCL_FOG_COLOR                                                             0x000002a8
@@ -2525,7 +2551,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV10TCL_ALPHA_FUNC_FUNC_EQUAL                                                        0x00000202
 #define   NV10TCL_ALPHA_FUNC_FUNC_LEQUAL                                               0x00000203
 #define   NV10TCL_ALPHA_FUNC_FUNC_GREATER                                              0x00000204
-#define   NV10TCL_ALPHA_FUNC_FUNC_GREATER                                              0x00000204
 #define   NV10TCL_ALPHA_FUNC_FUNC_NOTEQUAL                                             0x00000205
 #define   NV10TCL_ALPHA_FUNC_FUNC_GEQUAL                                               0x00000206
 #define   NV10TCL_ALPHA_FUNC_FUNC_ALWAYS                                               0x00000207
@@ -2583,7 +2608,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV10TCL_DEPTH_FUNC_EQUAL                                                     0x00000202
 #define   NV10TCL_DEPTH_FUNC_LEQUAL                                                    0x00000203
 #define   NV10TCL_DEPTH_FUNC_GREATER                                                   0x00000204
-#define   NV10TCL_DEPTH_FUNC_GREATER                                                   0x00000204
 #define   NV10TCL_DEPTH_FUNC_NOTEQUAL                                                  0x00000205
 #define   NV10TCL_DEPTH_FUNC_GEQUAL                                                    0x00000206
 #define   NV10TCL_DEPTH_FUNC_ALWAYS                                                    0x00000207
@@ -2600,7 +2624,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV10TCL_STENCIL_FUNC_FUNC_EQUAL                                              0x00000202
 #define   NV10TCL_STENCIL_FUNC_FUNC_LEQUAL                                             0x00000203
 #define   NV10TCL_STENCIL_FUNC_FUNC_GREATER                                            0x00000204
-#define   NV10TCL_STENCIL_FUNC_FUNC_GREATER                                            0x00000204
 #define   NV10TCL_STENCIL_FUNC_FUNC_NOTEQUAL                                           0x00000205
 #define   NV10TCL_STENCIL_FUNC_FUNC_GEQUAL                                             0x00000206
 #define   NV10TCL_STENCIL_FUNC_FUNC_ALWAYS                                             0x00000207
@@ -2898,13 +2921,15 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define  NV10TCL_VTXFMT__SIZE                                                          0x00000008
 #define   NV10TCL_VTXFMT_TYPE_SHIFT                                                    0
 #define   NV10TCL_VTXFMT_TYPE_MASK                                                     0x0000000f
-#define    NV10TCL_VTXFMT_TYPE_UBYTE                                                   0x00000000
-#define    NV10TCL_VTXFMT_TYPE_USHORT                                                  0x00000001
+#define    NV10TCL_VTXFMT_TYPE_BYTE_BGRA                                               0x00000000
+#define    NV10TCL_VTXFMT_TYPE_SHORT                                                   0x00000001
 #define    NV10TCL_VTXFMT_TYPE_FLOAT                                                   0x00000002
+#define    NV10TCL_VTXFMT_TYPE_BYTE_RGBA                                               0x00000004
 #define   NV10TCL_VTXFMT_FIELDS_SHIFT                                                  4
 #define   NV10TCL_VTXFMT_FIELDS_MASK                                                   0x000000f0
 #define   NV10TCL_VTXFMT_STRIDE_SHIFT                                                  8
 #define   NV10TCL_VTXFMT_STRIDE_MASK                                                   0x0000ff00
+#define   NV10TCL_VTXFMT_POS_HOMOGENEOUS                                               (1 << 24)
 #define  NV10TCL_VERTEX_ARRAY_OFFSET_POS                                               0x00000d00
 #define  NV10TCL_VERTEX_ARRAY_FORMAT_POS                                               0x00000d04
 #define   NV10TCL_VERTEX_ARRAY_FORMAT_POS_TYPE_SHIFT                                   0
@@ -3304,11 +3329,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 
 
-#define NV10_DX5_TEXTURED_TRIANGLE                                                     0x00000094
+#define NV10_TEXTURED_TRIANGLE                                                         0x00000094
 
 
 
-#define NV10_DX6_MULTITEX_TRIANGLE                                                     0x00000095
+#define NV10_MULTITEX_TRIANGLE                                                         0x00000095
 
 
 
@@ -3383,325 +3408,325 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV20TCL_RC_IN_ALPHA_D_INPUT_SHIFT                                            0
 #define   NV20TCL_RC_IN_ALPHA_D_INPUT_MASK                                             0x0000000f
 #define    NV20TCL_RC_IN_ALPHA_D_INPUT_ZERO                                            0x00000000
-#define    NV20TCL_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR0_NV                              0x00000001
-#define    NV20TCL_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR1_NV                              0x00000002
+#define    NV20TCL_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR0                                 0x00000001
+#define    NV20TCL_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR1                                 0x00000002
 #define    NV20TCL_RC_IN_ALPHA_D_INPUT_FOG                                             0x00000003
-#define    NV20TCL_RC_IN_ALPHA_D_INPUT_PRIMARY_COLOR_NV                                        0x00000004
-#define    NV20TCL_RC_IN_ALPHA_D_INPUT_SECONDARY_COLOR_NV                              0x00000005
-#define    NV20TCL_RC_IN_ALPHA_D_INPUT_TEXTURE0_ARB                                    0x00000008
-#define    NV20TCL_RC_IN_ALPHA_D_INPUT_TEXTURE1_ARB                                    0x00000009
-#define    NV20TCL_RC_IN_ALPHA_D_INPUT_SPARE0_NV                                       0x0000000c
-#define    NV20TCL_RC_IN_ALPHA_D_INPUT_SPARE1_NV                                       0x0000000d
-#define    NV20TCL_RC_IN_ALPHA_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                  0x0000000e
-#define    NV20TCL_RC_IN_ALPHA_D_INPUT_E_TIMES_F_NV                                    0x0000000f
-#define    NV20TCL_RC_IN_ALPHA_D_INPUT_TEXTURE2_ARB                                    0x0000000a
-#define    NV20TCL_RC_IN_ALPHA_D_INPUT_TEXTURE3_ARB                                    0x0000000b
+#define    NV20TCL_RC_IN_ALPHA_D_INPUT_PRIMARY_COLOR                                   0x00000004
+#define    NV20TCL_RC_IN_ALPHA_D_INPUT_SECONDARY_COLOR                                 0x00000005
+#define    NV20TCL_RC_IN_ALPHA_D_INPUT_TEXTURE0                                                0x00000008
+#define    NV20TCL_RC_IN_ALPHA_D_INPUT_TEXTURE1                                                0x00000009
+#define    NV20TCL_RC_IN_ALPHA_D_INPUT_SPARE0                                          0x0000000c
+#define    NV20TCL_RC_IN_ALPHA_D_INPUT_SPARE1                                          0x0000000d
+#define    NV20TCL_RC_IN_ALPHA_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR                     0x0000000e
+#define    NV20TCL_RC_IN_ALPHA_D_INPUT_E_TIMES_F                                       0x0000000f
+#define    NV20TCL_RC_IN_ALPHA_D_INPUT_TEXTURE2                                                0x0000000a
+#define    NV20TCL_RC_IN_ALPHA_D_INPUT_TEXTURE3                                                0x0000000b
 #define   NV20TCL_RC_IN_ALPHA_D_COMPONENT_USAGE                                                (1 <<  4)
 #define    NV20TCL_RC_IN_ALPHA_D_COMPONENT_USAGE_BLUE                                  0x00000000
 #define    NV20TCL_RC_IN_ALPHA_D_COMPONENT_USAGE_ALPHA                                 0x00000010
 #define   NV20TCL_RC_IN_ALPHA_D_MAPPING_SHIFT                                          5
 #define   NV20TCL_RC_IN_ALPHA_D_MAPPING_MASK                                           0x000000e0
-#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_UNSIGNED_IDENTITY_NV                          0x00000000
-#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_UNSIGNED_INVERT_NV                            0x00000020
-#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_EXPAND_NORMAL_NV                              0x00000040
-#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_EXPAND_NEGATE_NV                              0x00000060
-#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NORMAL_NV                           0x00000080
-#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NEGATE_NV                           0x000000a0
-#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_SIGNED_IDENTITY_NV                            0x000000c0
-#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_SIGNED_NEGATE_NV                              0x000000e0
+#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_UNSIGNED_IDENTITY                             0x00000000
+#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_UNSIGNED_INVERT                               0x00000020
+#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_EXPAND_NORMAL                                 0x00000040
+#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_EXPAND_NEGATE                                 0x00000060
+#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NORMAL                              0x00000080
+#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NEGATE                              0x000000a0
+#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_SIGNED_IDENTITY                               0x000000c0
+#define    NV20TCL_RC_IN_ALPHA_D_MAPPING_SIGNED_NEGATE                                 0x000000e0
 #define   NV20TCL_RC_IN_ALPHA_C_INPUT_SHIFT                                            8
 #define   NV20TCL_RC_IN_ALPHA_C_INPUT_MASK                                             0x00000f00
 #define    NV20TCL_RC_IN_ALPHA_C_INPUT_ZERO                                            0x00000000
-#define    NV20TCL_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR0_NV                              0x00000100
-#define    NV20TCL_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR1_NV                              0x00000200
+#define    NV20TCL_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR0                                 0x00000100
+#define    NV20TCL_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR1                                 0x00000200
 #define    NV20TCL_RC_IN_ALPHA_C_INPUT_FOG                                             0x00000300
-#define    NV20TCL_RC_IN_ALPHA_C_INPUT_PRIMARY_COLOR_NV                                        0x00000400
-#define    NV20TCL_RC_IN_ALPHA_C_INPUT_SECONDARY_COLOR_NV                              0x00000500
-#define    NV20TCL_RC_IN_ALPHA_C_INPUT_TEXTURE0_ARB                                    0x00000800
-#define    NV20TCL_RC_IN_ALPHA_C_INPUT_TEXTURE1_ARB                                    0x00000900
-#define    NV20TCL_RC_IN_ALPHA_C_INPUT_SPARE0_NV                                       0x00000c00
-#define    NV20TCL_RC_IN_ALPHA_C_INPUT_SPARE1_NV                                       0x00000d00
-#define    NV20TCL_RC_IN_ALPHA_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                  0x00000e00
-#define    NV20TCL_RC_IN_ALPHA_C_INPUT_E_TIMES_F_NV                                    0x00000f00
-#define    NV20TCL_RC_IN_ALPHA_C_INPUT_TEXTURE2_ARB                                    0x00000a00
-#define    NV20TCL_RC_IN_ALPHA_C_INPUT_TEXTURE3_ARB                                    0x00000b00
+#define    NV20TCL_RC_IN_ALPHA_C_INPUT_PRIMARY_COLOR                                   0x00000400
+#define    NV20TCL_RC_IN_ALPHA_C_INPUT_SECONDARY_COLOR                                 0x00000500
+#define    NV20TCL_RC_IN_ALPHA_C_INPUT_TEXTURE0                                                0x00000800
+#define    NV20TCL_RC_IN_ALPHA_C_INPUT_TEXTURE1                                                0x00000900
+#define    NV20TCL_RC_IN_ALPHA_C_INPUT_SPARE0                                          0x00000c00
+#define    NV20TCL_RC_IN_ALPHA_C_INPUT_SPARE1                                          0x00000d00
+#define    NV20TCL_RC_IN_ALPHA_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR                     0x00000e00
+#define    NV20TCL_RC_IN_ALPHA_C_INPUT_E_TIMES_F                                       0x00000f00
+#define    NV20TCL_RC_IN_ALPHA_C_INPUT_TEXTURE2                                                0x00000a00
+#define    NV20TCL_RC_IN_ALPHA_C_INPUT_TEXTURE3                                                0x00000b00
 #define   NV20TCL_RC_IN_ALPHA_C_COMPONENT_USAGE                                                (1 << 12)
 #define    NV20TCL_RC_IN_ALPHA_C_COMPONENT_USAGE_BLUE                                  0x00000000
 #define    NV20TCL_RC_IN_ALPHA_C_COMPONENT_USAGE_ALPHA                                 0x00001000
 #define   NV20TCL_RC_IN_ALPHA_C_MAPPING_SHIFT                                          13
 #define   NV20TCL_RC_IN_ALPHA_C_MAPPING_MASK                                           0x0000e000
-#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_UNSIGNED_IDENTITY_NV                          0x00000000
-#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_UNSIGNED_INVERT_NV                            0x00002000
-#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_EXPAND_NORMAL_NV                              0x00004000
-#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_EXPAND_NEGATE_NV                              0x00006000
-#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NORMAL_NV                           0x00008000
-#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NEGATE_NV                           0x0000a000
-#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_SIGNED_IDENTITY_NV                            0x0000c000
-#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_SIGNED_NEGATE_NV                              0x0000e000
+#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_UNSIGNED_IDENTITY                             0x00000000
+#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_UNSIGNED_INVERT                               0x00002000
+#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_EXPAND_NORMAL                                 0x00004000
+#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_EXPAND_NEGATE                                 0x00006000
+#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NORMAL                              0x00008000
+#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NEGATE                              0x0000a000
+#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_SIGNED_IDENTITY                               0x0000c000
+#define    NV20TCL_RC_IN_ALPHA_C_MAPPING_SIGNED_NEGATE                                 0x0000e000
 #define   NV20TCL_RC_IN_ALPHA_B_INPUT_SHIFT                                            16
 #define   NV20TCL_RC_IN_ALPHA_B_INPUT_MASK                                             0x000f0000
 #define    NV20TCL_RC_IN_ALPHA_B_INPUT_ZERO                                            0x00000000
-#define    NV20TCL_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR0_NV                              0x00010000
-#define    NV20TCL_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR1_NV                              0x00020000
+#define    NV20TCL_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR0                                 0x00010000
+#define    NV20TCL_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR1                                 0x00020000
 #define    NV20TCL_RC_IN_ALPHA_B_INPUT_FOG                                             0x00030000
-#define    NV20TCL_RC_IN_ALPHA_B_INPUT_PRIMARY_COLOR_NV                                        0x00040000
-#define    NV20TCL_RC_IN_ALPHA_B_INPUT_SECONDARY_COLOR_NV                              0x00050000
-#define    NV20TCL_RC_IN_ALPHA_B_INPUT_TEXTURE0_ARB                                    0x00080000
-#define    NV20TCL_RC_IN_ALPHA_B_INPUT_TEXTURE1_ARB                                    0x00090000
-#define    NV20TCL_RC_IN_ALPHA_B_INPUT_SPARE0_NV                                       0x000c0000
-#define    NV20TCL_RC_IN_ALPHA_B_INPUT_SPARE1_NV                                       0x000d0000
-#define    NV20TCL_RC_IN_ALPHA_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                  0x000e0000
-#define    NV20TCL_RC_IN_ALPHA_B_INPUT_E_TIMES_F_NV                                    0x000f0000
-#define    NV20TCL_RC_IN_ALPHA_B_INPUT_TEXTURE2_ARB                                    0x000a0000
-#define    NV20TCL_RC_IN_ALPHA_B_INPUT_TEXTURE3_ARB                                    0x000b0000
+#define    NV20TCL_RC_IN_ALPHA_B_INPUT_PRIMARY_COLOR                                   0x00040000
+#define    NV20TCL_RC_IN_ALPHA_B_INPUT_SECONDARY_COLOR                                 0x00050000
+#define    NV20TCL_RC_IN_ALPHA_B_INPUT_TEXTURE0                                                0x00080000
+#define    NV20TCL_RC_IN_ALPHA_B_INPUT_TEXTURE1                                                0x00090000
+#define    NV20TCL_RC_IN_ALPHA_B_INPUT_SPARE0                                          0x000c0000
+#define    NV20TCL_RC_IN_ALPHA_B_INPUT_SPARE1                                          0x000d0000
+#define    NV20TCL_RC_IN_ALPHA_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR                     0x000e0000
+#define    NV20TCL_RC_IN_ALPHA_B_INPUT_E_TIMES_F                                       0x000f0000
+#define    NV20TCL_RC_IN_ALPHA_B_INPUT_TEXTURE2                                                0x000a0000
+#define    NV20TCL_RC_IN_ALPHA_B_INPUT_TEXTURE3                                                0x000b0000
 #define   NV20TCL_RC_IN_ALPHA_B_COMPONENT_USAGE                                                (1 << 20)
 #define    NV20TCL_RC_IN_ALPHA_B_COMPONENT_USAGE_BLUE                                  0x00000000
 #define    NV20TCL_RC_IN_ALPHA_B_COMPONENT_USAGE_ALPHA                                 0x00100000
 #define   NV20TCL_RC_IN_ALPHA_B_MAPPING_SHIFT                                          21
 #define   NV20TCL_RC_IN_ALPHA_B_MAPPING_MASK                                           0x00e00000
-#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_UNSIGNED_IDENTITY_NV                          0x00000000
-#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_UNSIGNED_INVERT_NV                            0x00200000
-#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_EXPAND_NORMAL_NV                              0x00400000
-#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_EXPAND_NEGATE_NV                              0x00600000
-#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NORMAL_NV                           0x00800000
-#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NEGATE_NV                           0x00a00000
-#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_SIGNED_IDENTITY_NV                            0x00c00000
-#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_SIGNED_NEGATE_NV                              0x00e00000
+#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_UNSIGNED_IDENTITY                             0x00000000
+#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_UNSIGNED_INVERT                               0x00200000
+#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_EXPAND_NORMAL                                 0x00400000
+#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_EXPAND_NEGATE                                 0x00600000
+#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NORMAL                              0x00800000
+#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NEGATE                              0x00a00000
+#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_SIGNED_IDENTITY                               0x00c00000
+#define    NV20TCL_RC_IN_ALPHA_B_MAPPING_SIGNED_NEGATE                                 0x00e00000
 #define   NV20TCL_RC_IN_ALPHA_A_INPUT_SHIFT                                            24
 #define   NV20TCL_RC_IN_ALPHA_A_INPUT_MASK                                             0x0f000000
 #define    NV20TCL_RC_IN_ALPHA_A_INPUT_ZERO                                            0x00000000
-#define    NV20TCL_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR0_NV                              0x01000000
-#define    NV20TCL_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR1_NV                              0x02000000
+#define    NV20TCL_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR0                                 0x01000000
+#define    NV20TCL_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR1                                 0x02000000
 #define    NV20TCL_RC_IN_ALPHA_A_INPUT_FOG                                             0x03000000
-#define    NV20TCL_RC_IN_ALPHA_A_INPUT_PRIMARY_COLOR_NV                                        0x04000000
-#define    NV20TCL_RC_IN_ALPHA_A_INPUT_SECONDARY_COLOR_NV                              0x05000000
-#define    NV20TCL_RC_IN_ALPHA_A_INPUT_TEXTURE0_ARB                                    0x08000000
-#define    NV20TCL_RC_IN_ALPHA_A_INPUT_TEXTURE1_ARB                                    0x09000000
-#define    NV20TCL_RC_IN_ALPHA_A_INPUT_SPARE0_NV                                       0x0c000000
-#define    NV20TCL_RC_IN_ALPHA_A_INPUT_SPARE1_NV                                       0x0d000000
-#define    NV20TCL_RC_IN_ALPHA_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                  0x0e000000
-#define    NV20TCL_RC_IN_ALPHA_A_INPUT_E_TIMES_F_NV                                    0x0f000000
-#define    NV20TCL_RC_IN_ALPHA_A_INPUT_TEXTURE2_ARB                                    0x0a000000
-#define    NV20TCL_RC_IN_ALPHA_A_INPUT_TEXTURE3_ARB                                    0x0b000000
+#define    NV20TCL_RC_IN_ALPHA_A_INPUT_PRIMARY_COLOR                                   0x04000000
+#define    NV20TCL_RC_IN_ALPHA_A_INPUT_SECONDARY_COLOR                                 0x05000000
+#define    NV20TCL_RC_IN_ALPHA_A_INPUT_TEXTURE0                                                0x08000000
+#define    NV20TCL_RC_IN_ALPHA_A_INPUT_TEXTURE1                                                0x09000000
+#define    NV20TCL_RC_IN_ALPHA_A_INPUT_SPARE0                                          0x0c000000
+#define    NV20TCL_RC_IN_ALPHA_A_INPUT_SPARE1                                          0x0d000000
+#define    NV20TCL_RC_IN_ALPHA_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR                     0x0e000000
+#define    NV20TCL_RC_IN_ALPHA_A_INPUT_E_TIMES_F                                       0x0f000000
+#define    NV20TCL_RC_IN_ALPHA_A_INPUT_TEXTURE2                                                0x0a000000
+#define    NV20TCL_RC_IN_ALPHA_A_INPUT_TEXTURE3                                                0x0b000000
 #define   NV20TCL_RC_IN_ALPHA_A_COMPONENT_USAGE                                                (1 << 28)
 #define    NV20TCL_RC_IN_ALPHA_A_COMPONENT_USAGE_BLUE                                  0x00000000
 #define    NV20TCL_RC_IN_ALPHA_A_COMPONENT_USAGE_ALPHA                                 0x10000000
 #define   NV20TCL_RC_IN_ALPHA_A_MAPPING_SHIFT                                          29
 #define   NV20TCL_RC_IN_ALPHA_A_MAPPING_MASK                                           0xe0000000
-#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_UNSIGNED_IDENTITY_NV                          0x00000000
-#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_UNSIGNED_INVERT_NV                            0x20000000
-#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_EXPAND_NORMAL_NV                              0x40000000
-#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_EXPAND_NEGATE_NV                              0x60000000
-#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NORMAL_NV                           0x80000000
-#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NEGATE_NV                           0xa0000000
-#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_SIGNED_IDENTITY_NV                            0xc0000000
-#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_SIGNED_NEGATE_NV                              0xe0000000
+#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_UNSIGNED_IDENTITY                             0x00000000
+#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_UNSIGNED_INVERT                               0x20000000
+#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_EXPAND_NORMAL                                 0x40000000
+#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_EXPAND_NEGATE                                 0x60000000
+#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NORMAL                              0x80000000
+#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NEGATE                              0xa0000000
+#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_SIGNED_IDENTITY                               0xc0000000
+#define    NV20TCL_RC_IN_ALPHA_A_MAPPING_SIGNED_NEGATE                                 0xe0000000
 #define  NV20TCL_RC_FINAL0                                                             0x00000288
 #define   NV20TCL_RC_FINAL0_D_INPUT_SHIFT                                              0
 #define   NV20TCL_RC_FINAL0_D_INPUT_MASK                                               0x0000000f
 #define    NV20TCL_RC_FINAL0_D_INPUT_ZERO                                              0x00000000
-#define    NV20TCL_RC_FINAL0_D_INPUT_CONSTANT_COLOR0_NV                                        0x00000001
-#define    NV20TCL_RC_FINAL0_D_INPUT_CONSTANT_COLOR1_NV                                        0x00000002
+#define    NV20TCL_RC_FINAL0_D_INPUT_CONSTANT_COLOR0                                   0x00000001
+#define    NV20TCL_RC_FINAL0_D_INPUT_CONSTANT_COLOR1                                   0x00000002
 #define    NV20TCL_RC_FINAL0_D_INPUT_FOG                                               0x00000003
-#define    NV20TCL_RC_FINAL0_D_INPUT_PRIMARY_COLOR_NV                                  0x00000004
-#define    NV20TCL_RC_FINAL0_D_INPUT_SECONDARY_COLOR_NV                                        0x00000005
-#define    NV20TCL_RC_FINAL0_D_INPUT_TEXTURE0_ARB                                      0x00000008
-#define    NV20TCL_RC_FINAL0_D_INPUT_TEXTURE1_ARB                                      0x00000009
-#define    NV20TCL_RC_FINAL0_D_INPUT_SPARE0_NV                                         0x0000000c
-#define    NV20TCL_RC_FINAL0_D_INPUT_SPARE1_NV                                         0x0000000d
-#define    NV20TCL_RC_FINAL0_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x0000000e
-#define    NV20TCL_RC_FINAL0_D_INPUT_E_TIMES_F_NV                                      0x0000000f
-#define    NV20TCL_RC_FINAL0_D_INPUT_TEXTURE2_ARB                                      0x0000000a
-#define    NV20TCL_RC_FINAL0_D_INPUT_TEXTURE3_ARB                                      0x0000000b
+#define    NV20TCL_RC_FINAL0_D_INPUT_PRIMARY_COLOR                                     0x00000004
+#define    NV20TCL_RC_FINAL0_D_INPUT_SECONDARY_COLOR                                   0x00000005
+#define    NV20TCL_RC_FINAL0_D_INPUT_TEXTURE0                                          0x00000008
+#define    NV20TCL_RC_FINAL0_D_INPUT_TEXTURE1                                          0x00000009
+#define    NV20TCL_RC_FINAL0_D_INPUT_SPARE0                                            0x0000000c
+#define    NV20TCL_RC_FINAL0_D_INPUT_SPARE1                                            0x0000000d
+#define    NV20TCL_RC_FINAL0_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x0000000e
+#define    NV20TCL_RC_FINAL0_D_INPUT_E_TIMES_F                                         0x0000000f
+#define    NV20TCL_RC_FINAL0_D_INPUT_TEXTURE2                                          0x0000000a
+#define    NV20TCL_RC_FINAL0_D_INPUT_TEXTURE3                                          0x0000000b
 #define   NV20TCL_RC_FINAL0_D_COMPONENT_USAGE                                          (1 <<  4)
 #define    NV20TCL_RC_FINAL0_D_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV20TCL_RC_FINAL0_D_COMPONENT_USAGE_ALPHA                                   0x00000010
 #define   NV20TCL_RC_FINAL0_D_MAPPING_SHIFT                                            5
 #define   NV20TCL_RC_FINAL0_D_MAPPING_MASK                                             0x000000e0
-#define    NV20TCL_RC_FINAL0_D_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV20TCL_RC_FINAL0_D_MAPPING_UNSIGNED_INVERT_NV                              0x00000020
-#define    NV20TCL_RC_FINAL0_D_MAPPING_EXPAND_NORMAL_NV                                        0x00000040
-#define    NV20TCL_RC_FINAL0_D_MAPPING_EXPAND_NEGATE_NV                                        0x00000060
-#define    NV20TCL_RC_FINAL0_D_MAPPING_HALF_BIAS_NORMAL_NV                             0x00000080
-#define    NV20TCL_RC_FINAL0_D_MAPPING_HALF_BIAS_NEGATE_NV                             0x000000a0
-#define    NV20TCL_RC_FINAL0_D_MAPPING_SIGNED_IDENTITY_NV                              0x000000c0
-#define    NV20TCL_RC_FINAL0_D_MAPPING_SIGNED_NEGATE_NV                                        0x000000e0
+#define    NV20TCL_RC_FINAL0_D_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV20TCL_RC_FINAL0_D_MAPPING_UNSIGNED_INVERT                                 0x00000020
+#define    NV20TCL_RC_FINAL0_D_MAPPING_EXPAND_NORMAL                                   0x00000040
+#define    NV20TCL_RC_FINAL0_D_MAPPING_EXPAND_NEGATE                                   0x00000060
+#define    NV20TCL_RC_FINAL0_D_MAPPING_HALF_BIAS_NORMAL                                        0x00000080
+#define    NV20TCL_RC_FINAL0_D_MAPPING_HALF_BIAS_NEGATE                                        0x000000a0
+#define    NV20TCL_RC_FINAL0_D_MAPPING_SIGNED_IDENTITY                                 0x000000c0
+#define    NV20TCL_RC_FINAL0_D_MAPPING_SIGNED_NEGATE                                   0x000000e0
 #define   NV20TCL_RC_FINAL0_C_INPUT_SHIFT                                              8
 #define   NV20TCL_RC_FINAL0_C_INPUT_MASK                                               0x00000f00
 #define    NV20TCL_RC_FINAL0_C_INPUT_ZERO                                              0x00000000
-#define    NV20TCL_RC_FINAL0_C_INPUT_CONSTANT_COLOR0_NV                                        0x00000100
-#define    NV20TCL_RC_FINAL0_C_INPUT_CONSTANT_COLOR1_NV                                        0x00000200
+#define    NV20TCL_RC_FINAL0_C_INPUT_CONSTANT_COLOR0                                   0x00000100
+#define    NV20TCL_RC_FINAL0_C_INPUT_CONSTANT_COLOR1                                   0x00000200
 #define    NV20TCL_RC_FINAL0_C_INPUT_FOG                                               0x00000300
-#define    NV20TCL_RC_FINAL0_C_INPUT_PRIMARY_COLOR_NV                                  0x00000400
-#define    NV20TCL_RC_FINAL0_C_INPUT_SECONDARY_COLOR_NV                                        0x00000500
-#define    NV20TCL_RC_FINAL0_C_INPUT_TEXTURE0_ARB                                      0x00000800
-#define    NV20TCL_RC_FINAL0_C_INPUT_TEXTURE1_ARB                                      0x00000900
-#define    NV20TCL_RC_FINAL0_C_INPUT_SPARE0_NV                                         0x00000c00
-#define    NV20TCL_RC_FINAL0_C_INPUT_SPARE1_NV                                         0x00000d00
-#define    NV20TCL_RC_FINAL0_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x00000e00
-#define    NV20TCL_RC_FINAL0_C_INPUT_E_TIMES_F_NV                                      0x00000f00
-#define    NV20TCL_RC_FINAL0_C_INPUT_TEXTURE2_ARB                                      0x00000a00
-#define    NV20TCL_RC_FINAL0_C_INPUT_TEXTURE3_ARB                                      0x00000b00
+#define    NV20TCL_RC_FINAL0_C_INPUT_PRIMARY_COLOR                                     0x00000400
+#define    NV20TCL_RC_FINAL0_C_INPUT_SECONDARY_COLOR                                   0x00000500
+#define    NV20TCL_RC_FINAL0_C_INPUT_TEXTURE0                                          0x00000800
+#define    NV20TCL_RC_FINAL0_C_INPUT_TEXTURE1                                          0x00000900
+#define    NV20TCL_RC_FINAL0_C_INPUT_SPARE0                                            0x00000c00
+#define    NV20TCL_RC_FINAL0_C_INPUT_SPARE1                                            0x00000d00
+#define    NV20TCL_RC_FINAL0_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x00000e00
+#define    NV20TCL_RC_FINAL0_C_INPUT_E_TIMES_F                                         0x00000f00
+#define    NV20TCL_RC_FINAL0_C_INPUT_TEXTURE2                                          0x00000a00
+#define    NV20TCL_RC_FINAL0_C_INPUT_TEXTURE3                                          0x00000b00
 #define   NV20TCL_RC_FINAL0_C_COMPONENT_USAGE                                          (1 << 12)
 #define    NV20TCL_RC_FINAL0_C_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV20TCL_RC_FINAL0_C_COMPONENT_USAGE_ALPHA                                   0x00001000
 #define   NV20TCL_RC_FINAL0_C_MAPPING_SHIFT                                            13
 #define   NV20TCL_RC_FINAL0_C_MAPPING_MASK                                             0x0000e000
-#define    NV20TCL_RC_FINAL0_C_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV20TCL_RC_FINAL0_C_MAPPING_UNSIGNED_INVERT_NV                              0x00002000
-#define    NV20TCL_RC_FINAL0_C_MAPPING_EXPAND_NORMAL_NV                                        0x00004000
-#define    NV20TCL_RC_FINAL0_C_MAPPING_EXPAND_NEGATE_NV                                        0x00006000
-#define    NV20TCL_RC_FINAL0_C_MAPPING_HALF_BIAS_NORMAL_NV                             0x00008000
-#define    NV20TCL_RC_FINAL0_C_MAPPING_HALF_BIAS_NEGATE_NV                             0x0000a000
-#define    NV20TCL_RC_FINAL0_C_MAPPING_SIGNED_IDENTITY_NV                              0x0000c000
-#define    NV20TCL_RC_FINAL0_C_MAPPING_SIGNED_NEGATE_NV                                        0x0000e000
+#define    NV20TCL_RC_FINAL0_C_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV20TCL_RC_FINAL0_C_MAPPING_UNSIGNED_INVERT                                 0x00002000
+#define    NV20TCL_RC_FINAL0_C_MAPPING_EXPAND_NORMAL                                   0x00004000
+#define    NV20TCL_RC_FINAL0_C_MAPPING_EXPAND_NEGATE                                   0x00006000
+#define    NV20TCL_RC_FINAL0_C_MAPPING_HALF_BIAS_NORMAL                                        0x00008000
+#define    NV20TCL_RC_FINAL0_C_MAPPING_HALF_BIAS_NEGATE                                        0x0000a000
+#define    NV20TCL_RC_FINAL0_C_MAPPING_SIGNED_IDENTITY                                 0x0000c000
+#define    NV20TCL_RC_FINAL0_C_MAPPING_SIGNED_NEGATE                                   0x0000e000
 #define   NV20TCL_RC_FINAL0_B_INPUT_SHIFT                                              16
 #define   NV20TCL_RC_FINAL0_B_INPUT_MASK                                               0x000f0000
 #define    NV20TCL_RC_FINAL0_B_INPUT_ZERO                                              0x00000000
-#define    NV20TCL_RC_FINAL0_B_INPUT_CONSTANT_COLOR0_NV                                        0x00010000
-#define    NV20TCL_RC_FINAL0_B_INPUT_CONSTANT_COLOR1_NV                                        0x00020000
+#define    NV20TCL_RC_FINAL0_B_INPUT_CONSTANT_COLOR0                                   0x00010000
+#define    NV20TCL_RC_FINAL0_B_INPUT_CONSTANT_COLOR1                                   0x00020000
 #define    NV20TCL_RC_FINAL0_B_INPUT_FOG                                               0x00030000
-#define    NV20TCL_RC_FINAL0_B_INPUT_PRIMARY_COLOR_NV                                  0x00040000
-#define    NV20TCL_RC_FINAL0_B_INPUT_SECONDARY_COLOR_NV                                        0x00050000
-#define    NV20TCL_RC_FINAL0_B_INPUT_TEXTURE0_ARB                                      0x00080000
-#define    NV20TCL_RC_FINAL0_B_INPUT_TEXTURE1_ARB                                      0x00090000
-#define    NV20TCL_RC_FINAL0_B_INPUT_SPARE0_NV                                         0x000c0000
-#define    NV20TCL_RC_FINAL0_B_INPUT_SPARE1_NV                                         0x000d0000
-#define    NV20TCL_RC_FINAL0_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x000e0000
-#define    NV20TCL_RC_FINAL0_B_INPUT_E_TIMES_F_NV                                      0x000f0000
-#define    NV20TCL_RC_FINAL0_B_INPUT_TEXTURE2_ARB                                      0x000a0000
-#define    NV20TCL_RC_FINAL0_B_INPUT_TEXTURE3_ARB                                      0x000b0000
+#define    NV20TCL_RC_FINAL0_B_INPUT_PRIMARY_COLOR                                     0x00040000
+#define    NV20TCL_RC_FINAL0_B_INPUT_SECONDARY_COLOR                                   0x00050000
+#define    NV20TCL_RC_FINAL0_B_INPUT_TEXTURE0                                          0x00080000
+#define    NV20TCL_RC_FINAL0_B_INPUT_TEXTURE1                                          0x00090000
+#define    NV20TCL_RC_FINAL0_B_INPUT_SPARE0                                            0x000c0000
+#define    NV20TCL_RC_FINAL0_B_INPUT_SPARE1                                            0x000d0000
+#define    NV20TCL_RC_FINAL0_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x000e0000
+#define    NV20TCL_RC_FINAL0_B_INPUT_E_TIMES_F                                         0x000f0000
+#define    NV20TCL_RC_FINAL0_B_INPUT_TEXTURE2                                          0x000a0000
+#define    NV20TCL_RC_FINAL0_B_INPUT_TEXTURE3                                          0x000b0000
 #define   NV20TCL_RC_FINAL0_B_COMPONENT_USAGE                                          (1 << 20)
 #define    NV20TCL_RC_FINAL0_B_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV20TCL_RC_FINAL0_B_COMPONENT_USAGE_ALPHA                                   0x00100000
 #define   NV20TCL_RC_FINAL0_B_MAPPING_SHIFT                                            21
 #define   NV20TCL_RC_FINAL0_B_MAPPING_MASK                                             0x00e00000
-#define    NV20TCL_RC_FINAL0_B_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV20TCL_RC_FINAL0_B_MAPPING_UNSIGNED_INVERT_NV                              0x00200000
-#define    NV20TCL_RC_FINAL0_B_MAPPING_EXPAND_NORMAL_NV                                        0x00400000
-#define    NV20TCL_RC_FINAL0_B_MAPPING_EXPAND_NEGATE_NV                                        0x00600000
-#define    NV20TCL_RC_FINAL0_B_MAPPING_HALF_BIAS_NORMAL_NV                             0x00800000
-#define    NV20TCL_RC_FINAL0_B_MAPPING_HALF_BIAS_NEGATE_NV                             0x00a00000
-#define    NV20TCL_RC_FINAL0_B_MAPPING_SIGNED_IDENTITY_NV                              0x00c00000
-#define    NV20TCL_RC_FINAL0_B_MAPPING_SIGNED_NEGATE_NV                                        0x00e00000
+#define    NV20TCL_RC_FINAL0_B_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV20TCL_RC_FINAL0_B_MAPPING_UNSIGNED_INVERT                                 0x00200000
+#define    NV20TCL_RC_FINAL0_B_MAPPING_EXPAND_NORMAL                                   0x00400000
+#define    NV20TCL_RC_FINAL0_B_MAPPING_EXPAND_NEGATE                                   0x00600000
+#define    NV20TCL_RC_FINAL0_B_MAPPING_HALF_BIAS_NORMAL                                        0x00800000
+#define    NV20TCL_RC_FINAL0_B_MAPPING_HALF_BIAS_NEGATE                                        0x00a00000
+#define    NV20TCL_RC_FINAL0_B_MAPPING_SIGNED_IDENTITY                                 0x00c00000
+#define    NV20TCL_RC_FINAL0_B_MAPPING_SIGNED_NEGATE                                   0x00e00000
 #define   NV20TCL_RC_FINAL0_A_INPUT_SHIFT                                              24
 #define   NV20TCL_RC_FINAL0_A_INPUT_MASK                                               0x0f000000
 #define    NV20TCL_RC_FINAL0_A_INPUT_ZERO                                              0x00000000
-#define    NV20TCL_RC_FINAL0_A_INPUT_CONSTANT_COLOR0_NV                                        0x01000000
-#define    NV20TCL_RC_FINAL0_A_INPUT_CONSTANT_COLOR1_NV                                        0x02000000
+#define    NV20TCL_RC_FINAL0_A_INPUT_CONSTANT_COLOR0                                   0x01000000
+#define    NV20TCL_RC_FINAL0_A_INPUT_CONSTANT_COLOR1                                   0x02000000
 #define    NV20TCL_RC_FINAL0_A_INPUT_FOG                                               0x03000000
-#define    NV20TCL_RC_FINAL0_A_INPUT_PRIMARY_COLOR_NV                                  0x04000000
-#define    NV20TCL_RC_FINAL0_A_INPUT_SECONDARY_COLOR_NV                                        0x05000000
-#define    NV20TCL_RC_FINAL0_A_INPUT_TEXTURE0_ARB                                      0x08000000
-#define    NV20TCL_RC_FINAL0_A_INPUT_TEXTURE1_ARB                                      0x09000000
-#define    NV20TCL_RC_FINAL0_A_INPUT_SPARE0_NV                                         0x0c000000
-#define    NV20TCL_RC_FINAL0_A_INPUT_SPARE1_NV                                         0x0d000000
-#define    NV20TCL_RC_FINAL0_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x0e000000
-#define    NV20TCL_RC_FINAL0_A_INPUT_E_TIMES_F_NV                                      0x0f000000
-#define    NV20TCL_RC_FINAL0_A_INPUT_TEXTURE2_ARB                                      0x0a000000
-#define    NV20TCL_RC_FINAL0_A_INPUT_TEXTURE3_ARB                                      0x0b000000
+#define    NV20TCL_RC_FINAL0_A_INPUT_PRIMARY_COLOR                                     0x04000000
+#define    NV20TCL_RC_FINAL0_A_INPUT_SECONDARY_COLOR                                   0x05000000
+#define    NV20TCL_RC_FINAL0_A_INPUT_TEXTURE0                                          0x08000000
+#define    NV20TCL_RC_FINAL0_A_INPUT_TEXTURE1                                          0x09000000
+#define    NV20TCL_RC_FINAL0_A_INPUT_SPARE0                                            0x0c000000
+#define    NV20TCL_RC_FINAL0_A_INPUT_SPARE1                                            0x0d000000
+#define    NV20TCL_RC_FINAL0_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x0e000000
+#define    NV20TCL_RC_FINAL0_A_INPUT_E_TIMES_F                                         0x0f000000
+#define    NV20TCL_RC_FINAL0_A_INPUT_TEXTURE2                                          0x0a000000
+#define    NV20TCL_RC_FINAL0_A_INPUT_TEXTURE3                                          0x0b000000
 #define   NV20TCL_RC_FINAL0_A_COMPONENT_USAGE                                          (1 << 28)
 #define    NV20TCL_RC_FINAL0_A_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV20TCL_RC_FINAL0_A_COMPONENT_USAGE_ALPHA                                   0x10000000
 #define   NV20TCL_RC_FINAL0_A_MAPPING_SHIFT                                            29
 #define   NV20TCL_RC_FINAL0_A_MAPPING_MASK                                             0xe0000000
-#define    NV20TCL_RC_FINAL0_A_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV20TCL_RC_FINAL0_A_MAPPING_UNSIGNED_INVERT_NV                              0x20000000
-#define    NV20TCL_RC_FINAL0_A_MAPPING_EXPAND_NORMAL_NV                                        0x40000000
-#define    NV20TCL_RC_FINAL0_A_MAPPING_EXPAND_NEGATE_NV                                        0x60000000
-#define    NV20TCL_RC_FINAL0_A_MAPPING_HALF_BIAS_NORMAL_NV                             0x80000000
-#define    NV20TCL_RC_FINAL0_A_MAPPING_HALF_BIAS_NEGATE_NV                             0xa0000000
-#define    NV20TCL_RC_FINAL0_A_MAPPING_SIGNED_IDENTITY_NV                              0xc0000000
-#define    NV20TCL_RC_FINAL0_A_MAPPING_SIGNED_NEGATE_NV                                        0xe0000000
+#define    NV20TCL_RC_FINAL0_A_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV20TCL_RC_FINAL0_A_MAPPING_UNSIGNED_INVERT                                 0x20000000
+#define    NV20TCL_RC_FINAL0_A_MAPPING_EXPAND_NORMAL                                   0x40000000
+#define    NV20TCL_RC_FINAL0_A_MAPPING_EXPAND_NEGATE                                   0x60000000
+#define    NV20TCL_RC_FINAL0_A_MAPPING_HALF_BIAS_NORMAL                                        0x80000000
+#define    NV20TCL_RC_FINAL0_A_MAPPING_HALF_BIAS_NEGATE                                        0xa0000000
+#define    NV20TCL_RC_FINAL0_A_MAPPING_SIGNED_IDENTITY                                 0xc0000000
+#define    NV20TCL_RC_FINAL0_A_MAPPING_SIGNED_NEGATE                                   0xe0000000
 #define  NV20TCL_RC_FINAL1                                                             0x0000028c
 #define   NV20TCL_RC_FINAL1_COLOR_SUM_CLAMP                                            (1 <<  7)
 #define   NV20TCL_RC_FINAL1_G_INPUT_SHIFT                                              8
 #define   NV20TCL_RC_FINAL1_G_INPUT_MASK                                               0x00000f00
 #define    NV20TCL_RC_FINAL1_G_INPUT_ZERO                                              0x00000000
-#define    NV20TCL_RC_FINAL1_G_INPUT_CONSTANT_COLOR0_NV                                        0x00000100
-#define    NV20TCL_RC_FINAL1_G_INPUT_CONSTANT_COLOR1_NV                                        0x00000200
+#define    NV20TCL_RC_FINAL1_G_INPUT_CONSTANT_COLOR0                                   0x00000100
+#define    NV20TCL_RC_FINAL1_G_INPUT_CONSTANT_COLOR1                                   0x00000200
 #define    NV20TCL_RC_FINAL1_G_INPUT_FOG                                               0x00000300
-#define    NV20TCL_RC_FINAL1_G_INPUT_PRIMARY_COLOR_NV                                  0x00000400
-#define    NV20TCL_RC_FINAL1_G_INPUT_SECONDARY_COLOR_NV                                        0x00000500
-#define    NV20TCL_RC_FINAL1_G_INPUT_TEXTURE0_ARB                                      0x00000800
-#define    NV20TCL_RC_FINAL1_G_INPUT_TEXTURE1_ARB                                      0x00000900
-#define    NV20TCL_RC_FINAL1_G_INPUT_SPARE0_NV                                         0x00000c00
-#define    NV20TCL_RC_FINAL1_G_INPUT_SPARE1_NV                                         0x00000d00
-#define    NV20TCL_RC_FINAL1_G_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x00000e00
-#define    NV20TCL_RC_FINAL1_G_INPUT_E_TIMES_F_NV                                      0x00000f00
-#define    NV20TCL_RC_FINAL1_G_INPUT_TEXTURE2_ARB                                      0x00000a00
-#define    NV20TCL_RC_FINAL1_G_INPUT_TEXTURE3_ARB                                      0x00000b00
+#define    NV20TCL_RC_FINAL1_G_INPUT_PRIMARY_COLOR                                     0x00000400
+#define    NV20TCL_RC_FINAL1_G_INPUT_SECONDARY_COLOR                                   0x00000500
+#define    NV20TCL_RC_FINAL1_G_INPUT_TEXTURE0                                          0x00000800
+#define    NV20TCL_RC_FINAL1_G_INPUT_TEXTURE1                                          0x00000900
+#define    NV20TCL_RC_FINAL1_G_INPUT_SPARE0                                            0x00000c00
+#define    NV20TCL_RC_FINAL1_G_INPUT_SPARE1                                            0x00000d00
+#define    NV20TCL_RC_FINAL1_G_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x00000e00
+#define    NV20TCL_RC_FINAL1_G_INPUT_E_TIMES_F                                         0x00000f00
+#define    NV20TCL_RC_FINAL1_G_INPUT_TEXTURE2                                          0x00000a00
+#define    NV20TCL_RC_FINAL1_G_INPUT_TEXTURE3                                          0x00000b00
 #define   NV20TCL_RC_FINAL1_G_COMPONENT_USAGE                                          (1 << 12)
 #define    NV20TCL_RC_FINAL1_G_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV20TCL_RC_FINAL1_G_COMPONENT_USAGE_ALPHA                                   0x00001000
 #define   NV20TCL_RC_FINAL1_G_MAPPING_SHIFT                                            13
 #define   NV20TCL_RC_FINAL1_G_MAPPING_MASK                                             0x0000e000
-#define    NV20TCL_RC_FINAL1_G_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV20TCL_RC_FINAL1_G_MAPPING_UNSIGNED_INVERT_NV                              0x00002000
-#define    NV20TCL_RC_FINAL1_G_MAPPING_EXPAND_NORMAL_NV                                        0x00004000
-#define    NV20TCL_RC_FINAL1_G_MAPPING_EXPAND_NEGATE_NV                                        0x00006000
-#define    NV20TCL_RC_FINAL1_G_MAPPING_HALF_BIAS_NORMAL_NV                             0x00008000
-#define    NV20TCL_RC_FINAL1_G_MAPPING_HALF_BIAS_NEGATE_NV                             0x0000a000
-#define    NV20TCL_RC_FINAL1_G_MAPPING_SIGNED_IDENTITY_NV                              0x0000c000
-#define    NV20TCL_RC_FINAL1_G_MAPPING_SIGNED_NEGATE_NV                                        0x0000e000
+#define    NV20TCL_RC_FINAL1_G_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV20TCL_RC_FINAL1_G_MAPPING_UNSIGNED_INVERT                                 0x00002000
+#define    NV20TCL_RC_FINAL1_G_MAPPING_EXPAND_NORMAL                                   0x00004000
+#define    NV20TCL_RC_FINAL1_G_MAPPING_EXPAND_NEGATE                                   0x00006000
+#define    NV20TCL_RC_FINAL1_G_MAPPING_HALF_BIAS_NORMAL                                        0x00008000
+#define    NV20TCL_RC_FINAL1_G_MAPPING_HALF_BIAS_NEGATE                                        0x0000a000
+#define    NV20TCL_RC_FINAL1_G_MAPPING_SIGNED_IDENTITY                                 0x0000c000
+#define    NV20TCL_RC_FINAL1_G_MAPPING_SIGNED_NEGATE                                   0x0000e000
 #define   NV20TCL_RC_FINAL1_F_INPUT_SHIFT                                              16
 #define   NV20TCL_RC_FINAL1_F_INPUT_MASK                                               0x000f0000
 #define    NV20TCL_RC_FINAL1_F_INPUT_ZERO                                              0x00000000
-#define    NV20TCL_RC_FINAL1_F_INPUT_CONSTANT_COLOR0_NV                                        0x00010000
-#define    NV20TCL_RC_FINAL1_F_INPUT_CONSTANT_COLOR1_NV                                        0x00020000
+#define    NV20TCL_RC_FINAL1_F_INPUT_CONSTANT_COLOR0                                   0x00010000
+#define    NV20TCL_RC_FINAL1_F_INPUT_CONSTANT_COLOR1                                   0x00020000
 #define    NV20TCL_RC_FINAL1_F_INPUT_FOG                                               0x00030000
-#define    NV20TCL_RC_FINAL1_F_INPUT_PRIMARY_COLOR_NV                                  0x00040000
-#define    NV20TCL_RC_FINAL1_F_INPUT_SECONDARY_COLOR_NV                                        0x00050000
-#define    NV20TCL_RC_FINAL1_F_INPUT_TEXTURE0_ARB                                      0x00080000
-#define    NV20TCL_RC_FINAL1_F_INPUT_TEXTURE1_ARB                                      0x00090000
-#define    NV20TCL_RC_FINAL1_F_INPUT_SPARE0_NV                                         0x000c0000
-#define    NV20TCL_RC_FINAL1_F_INPUT_SPARE1_NV                                         0x000d0000
-#define    NV20TCL_RC_FINAL1_F_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x000e0000
-#define    NV20TCL_RC_FINAL1_F_INPUT_E_TIMES_F_NV                                      0x000f0000
-#define    NV20TCL_RC_FINAL1_F_INPUT_TEXTURE2_ARB                                      0x000a0000
-#define    NV20TCL_RC_FINAL1_F_INPUT_TEXTURE3_ARB                                      0x000b0000
+#define    NV20TCL_RC_FINAL1_F_INPUT_PRIMARY_COLOR                                     0x00040000
+#define    NV20TCL_RC_FINAL1_F_INPUT_SECONDARY_COLOR                                   0x00050000
+#define    NV20TCL_RC_FINAL1_F_INPUT_TEXTURE0                                          0x00080000
+#define    NV20TCL_RC_FINAL1_F_INPUT_TEXTURE1                                          0x00090000
+#define    NV20TCL_RC_FINAL1_F_INPUT_SPARE0                                            0x000c0000
+#define    NV20TCL_RC_FINAL1_F_INPUT_SPARE1                                            0x000d0000
+#define    NV20TCL_RC_FINAL1_F_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x000e0000
+#define    NV20TCL_RC_FINAL1_F_INPUT_E_TIMES_F                                         0x000f0000
+#define    NV20TCL_RC_FINAL1_F_INPUT_TEXTURE2                                          0x000a0000
+#define    NV20TCL_RC_FINAL1_F_INPUT_TEXTURE3                                          0x000b0000
 #define   NV20TCL_RC_FINAL1_F_COMPONENT_USAGE                                          (1 << 20)
 #define    NV20TCL_RC_FINAL1_F_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV20TCL_RC_FINAL1_F_COMPONENT_USAGE_ALPHA                                   0x00100000
 #define   NV20TCL_RC_FINAL1_F_MAPPING_SHIFT                                            21
 #define   NV20TCL_RC_FINAL1_F_MAPPING_MASK                                             0x00e00000
-#define    NV20TCL_RC_FINAL1_F_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV20TCL_RC_FINAL1_F_MAPPING_UNSIGNED_INVERT_NV                              0x00200000
-#define    NV20TCL_RC_FINAL1_F_MAPPING_EXPAND_NORMAL_NV                                        0x00400000
-#define    NV20TCL_RC_FINAL1_F_MAPPING_EXPAND_NEGATE_NV                                        0x00600000
-#define    NV20TCL_RC_FINAL1_F_MAPPING_HALF_BIAS_NORMAL_NV                             0x00800000
-#define    NV20TCL_RC_FINAL1_F_MAPPING_HALF_BIAS_NEGATE_NV                             0x00a00000
-#define    NV20TCL_RC_FINAL1_F_MAPPING_SIGNED_IDENTITY_NV                              0x00c00000
-#define    NV20TCL_RC_FINAL1_F_MAPPING_SIGNED_NEGATE_NV                                        0x00e00000
+#define    NV20TCL_RC_FINAL1_F_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV20TCL_RC_FINAL1_F_MAPPING_UNSIGNED_INVERT                                 0x00200000
+#define    NV20TCL_RC_FINAL1_F_MAPPING_EXPAND_NORMAL                                   0x00400000
+#define    NV20TCL_RC_FINAL1_F_MAPPING_EXPAND_NEGATE                                   0x00600000
+#define    NV20TCL_RC_FINAL1_F_MAPPING_HALF_BIAS_NORMAL                                        0x00800000
+#define    NV20TCL_RC_FINAL1_F_MAPPING_HALF_BIAS_NEGATE                                        0x00a00000
+#define    NV20TCL_RC_FINAL1_F_MAPPING_SIGNED_IDENTITY                                 0x00c00000
+#define    NV20TCL_RC_FINAL1_F_MAPPING_SIGNED_NEGATE                                   0x00e00000
 #define   NV20TCL_RC_FINAL1_E_INPUT_SHIFT                                              24
 #define   NV20TCL_RC_FINAL1_E_INPUT_MASK                                               0x0f000000
 #define    NV20TCL_RC_FINAL1_E_INPUT_ZERO                                              0x00000000
-#define    NV20TCL_RC_FINAL1_E_INPUT_CONSTANT_COLOR0_NV                                        0x01000000
-#define    NV20TCL_RC_FINAL1_E_INPUT_CONSTANT_COLOR1_NV                                        0x02000000
+#define    NV20TCL_RC_FINAL1_E_INPUT_CONSTANT_COLOR0                                   0x01000000
+#define    NV20TCL_RC_FINAL1_E_INPUT_CONSTANT_COLOR1                                   0x02000000
 #define    NV20TCL_RC_FINAL1_E_INPUT_FOG                                               0x03000000
-#define    NV20TCL_RC_FINAL1_E_INPUT_PRIMARY_COLOR_NV                                  0x04000000
-#define    NV20TCL_RC_FINAL1_E_INPUT_SECONDARY_COLOR_NV                                        0x05000000
-#define    NV20TCL_RC_FINAL1_E_INPUT_TEXTURE0_ARB                                      0x08000000
-#define    NV20TCL_RC_FINAL1_E_INPUT_TEXTURE1_ARB                                      0x09000000
-#define    NV20TCL_RC_FINAL1_E_INPUT_SPARE0_NV                                         0x0c000000
-#define    NV20TCL_RC_FINAL1_E_INPUT_SPARE1_NV                                         0x0d000000
-#define    NV20TCL_RC_FINAL1_E_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x0e000000
-#define    NV20TCL_RC_FINAL1_E_INPUT_E_TIMES_F_NV                                      0x0f000000
-#define    NV20TCL_RC_FINAL1_E_INPUT_TEXTURE2_ARB                                      0x0a000000
-#define    NV20TCL_RC_FINAL1_E_INPUT_TEXTURE3_ARB                                      0x0b000000
+#define    NV20TCL_RC_FINAL1_E_INPUT_PRIMARY_COLOR                                     0x04000000
+#define    NV20TCL_RC_FINAL1_E_INPUT_SECONDARY_COLOR                                   0x05000000
+#define    NV20TCL_RC_FINAL1_E_INPUT_TEXTURE0                                          0x08000000
+#define    NV20TCL_RC_FINAL1_E_INPUT_TEXTURE1                                          0x09000000
+#define    NV20TCL_RC_FINAL1_E_INPUT_SPARE0                                            0x0c000000
+#define    NV20TCL_RC_FINAL1_E_INPUT_SPARE1                                            0x0d000000
+#define    NV20TCL_RC_FINAL1_E_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x0e000000
+#define    NV20TCL_RC_FINAL1_E_INPUT_E_TIMES_F                                         0x0f000000
+#define    NV20TCL_RC_FINAL1_E_INPUT_TEXTURE2                                          0x0a000000
+#define    NV20TCL_RC_FINAL1_E_INPUT_TEXTURE3                                          0x0b000000
 #define   NV20TCL_RC_FINAL1_E_COMPONENT_USAGE                                          (1 << 28)
 #define    NV20TCL_RC_FINAL1_E_COMPONENT_USAGE_RGB                                     0x00000000
 #define    NV20TCL_RC_FINAL1_E_COMPONENT_USAGE_ALPHA                                   0x10000000
 #define   NV20TCL_RC_FINAL1_E_MAPPING_SHIFT                                            29
 #define   NV20TCL_RC_FINAL1_E_MAPPING_MASK                                             0xe0000000
-#define    NV20TCL_RC_FINAL1_E_MAPPING_UNSIGNED_IDENTITY_NV                            0x00000000
-#define    NV20TCL_RC_FINAL1_E_MAPPING_UNSIGNED_INVERT_NV                              0x20000000
-#define    NV20TCL_RC_FINAL1_E_MAPPING_EXPAND_NORMAL_NV                                        0x40000000
-#define    NV20TCL_RC_FINAL1_E_MAPPING_EXPAND_NEGATE_NV                                        0x60000000
-#define    NV20TCL_RC_FINAL1_E_MAPPING_HALF_BIAS_NORMAL_NV                             0x80000000
-#define    NV20TCL_RC_FINAL1_E_MAPPING_HALF_BIAS_NEGATE_NV                             0xa0000000
-#define    NV20TCL_RC_FINAL1_E_MAPPING_SIGNED_IDENTITY_NV                              0xc0000000
-#define    NV20TCL_RC_FINAL1_E_MAPPING_SIGNED_NEGATE_NV                                        0xe0000000
+#define    NV20TCL_RC_FINAL1_E_MAPPING_UNSIGNED_IDENTITY                               0x00000000
+#define    NV20TCL_RC_FINAL1_E_MAPPING_UNSIGNED_INVERT                                 0x20000000
+#define    NV20TCL_RC_FINAL1_E_MAPPING_EXPAND_NORMAL                                   0x40000000
+#define    NV20TCL_RC_FINAL1_E_MAPPING_EXPAND_NEGATE                                   0x60000000
+#define    NV20TCL_RC_FINAL1_E_MAPPING_HALF_BIAS_NORMAL                                        0x80000000
+#define    NV20TCL_RC_FINAL1_E_MAPPING_HALF_BIAS_NEGATE                                        0xa0000000
+#define    NV20TCL_RC_FINAL1_E_MAPPING_SIGNED_IDENTITY                                 0xc0000000
+#define    NV20TCL_RC_FINAL1_E_MAPPING_SIGNED_NEGATE                                   0xe0000000
 #define  NV20TCL_LIGHT_CONTROL                                                         0x00000294
 #define  NV20TCL_FOG_MODE                                                              0x0000029c
 #define   NV20TCL_FOG_MODE_EXP                                                         0x00000800
@@ -3711,8 +3736,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV20TCL_FOG_MODE_LINEAR_2                                                    0x00002601
 #define  NV20TCL_FOG_COORD_DIST                                                                0x000002a0
 #define   NV20TCL_FOG_COORD_DIST_COORD_FALSE                                           0x00000000
-#define   NV20TCL_FOG_COORD_DIST_COORD_FRAGMENT_DEPTH_DISTANCE_EYE_RADIAL_NV           0x00000001
-#define   NV20TCL_FOG_COORD_DIST_COORD_FRAGMENT_DEPTH_DISTANCE_EYE_PLANE_ABSOLUTE_NV   0x00000002
+#define   NV20TCL_FOG_COORD_DIST_COORD_FRAGMENT_DEPTH_DISTANCE_EYE_RADIAL              0x00000001
+#define   NV20TCL_FOG_COORD_DIST_COORD_FRAGMENT_DEPTH_DISTANCE_EYE_PLANE_ABSOLUTE      0x00000002
 #define   NV20TCL_FOG_COORD_DIST_COORD_FOG                                             0x00000003
 #define  NV20TCL_FOG_ENABLE                                                            0x000002a4
 #define  NV20TCL_FOG_COLOR                                                             0x000002a8
@@ -3749,7 +3774,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV20TCL_ALPHA_FUNC_FUNC_EQUAL                                                        0x00000202
 #define   NV20TCL_ALPHA_FUNC_FUNC_LEQUAL                                               0x00000203
 #define   NV20TCL_ALPHA_FUNC_FUNC_GREATER                                              0x00000204
-#define   NV20TCL_ALPHA_FUNC_FUNC_GREATER                                              0x00000204
 #define   NV20TCL_ALPHA_FUNC_FUNC_NOTEQUAL                                             0x00000205
 #define   NV20TCL_ALPHA_FUNC_FUNC_GEQUAL                                               0x00000206
 #define   NV20TCL_ALPHA_FUNC_FUNC_ALWAYS                                               0x00000207
@@ -3807,7 +3831,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV20TCL_DEPTH_FUNC_EQUAL                                                     0x00000202
 #define   NV20TCL_DEPTH_FUNC_LEQUAL                                                    0x00000203
 #define   NV20TCL_DEPTH_FUNC_GREATER                                                   0x00000204
-#define   NV20TCL_DEPTH_FUNC_GREATER                                                   0x00000204
 #define   NV20TCL_DEPTH_FUNC_NOTEQUAL                                                  0x00000205
 #define   NV20TCL_DEPTH_FUNC_GEQUAL                                                    0x00000206
 #define   NV20TCL_DEPTH_FUNC_ALWAYS                                                    0x00000207
@@ -3824,7 +3847,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV20TCL_STENCIL_FUNC_FUNC_EQUAL                                              0x00000202
 #define   NV20TCL_STENCIL_FUNC_FUNC_LEQUAL                                             0x00000203
 #define   NV20TCL_STENCIL_FUNC_FUNC_GREATER                                            0x00000204
-#define   NV20TCL_STENCIL_FUNC_FUNC_GREATER                                            0x00000204
 #define   NV20TCL_STENCIL_FUNC_FUNC_NOTEQUAL                                           0x00000205
 #define   NV20TCL_STENCIL_FUNC_FUNC_GEQUAL                                             0x00000206
 #define   NV20TCL_STENCIL_FUNC_FUNC_ALWAYS                                             0x00000207
@@ -4019,181 +4041,181 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SHIFT                                         0
 #define   NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_MASK                                          0x0000000f
 #define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_ZERO                                         0x00000000
-#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR0_NV                           0x00000001
-#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR1_NV                           0x00000002
+#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR0                              0x00000001
+#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR1                              0x00000002
 #define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_FOG                                          0x00000003
-#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_PRIMARY_COLOR_NV                             0x00000004
-#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SECONDARY_COLOR_NV                           0x00000005
-#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE0_ARB                                 0x00000008
-#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE1_ARB                                 0x00000009
-#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE0_NV                                    0x0000000c
-#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE1_NV                                    0x0000000d
-#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR_NV               0x0000000e
-#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_E_TIMES_F_NV                                 0x0000000f
-#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE2_ARB                                 0x0000000a
-#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE3_ARB                                 0x0000000b
+#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_PRIMARY_COLOR                                        0x00000004
+#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SECONDARY_COLOR                              0x00000005
+#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE0                                     0x00000008
+#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE1                                     0x00000009
+#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE0                                       0x0000000c
+#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE1                                       0x0000000d
+#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR                  0x0000000e
+#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_E_TIMES_F                                    0x0000000f
+#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE2                                     0x0000000a
+#define    NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE3                                     0x0000000b
 #define   NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SHIFT                                         4
 #define   NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_MASK                                          0x000000f0
 #define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_ZERO                                         0x00000000
-#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR0_NV                           0x00000010
-#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR1_NV                           0x00000020
+#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR0                              0x00000010
+#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR1                              0x00000020
 #define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_FOG                                          0x00000030
-#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_PRIMARY_COLOR_NV                             0x00000040
-#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SECONDARY_COLOR_NV                           0x00000050
-#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE0_ARB                                 0x00000080
-#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE1_ARB                                 0x00000090
-#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE0_NV                                    0x000000c0
-#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE1_NV                                    0x000000d0
-#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR_NV               0x000000e0
-#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_E_TIMES_F_NV                                 0x000000f0
-#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE2_ARB                                 0x000000a0
-#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE3_ARB                                 0x000000b0
+#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_PRIMARY_COLOR                                        0x00000040
+#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SECONDARY_COLOR                              0x00000050
+#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE0                                     0x00000080
+#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE1                                     0x00000090
+#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE0                                       0x000000c0
+#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE1                                       0x000000d0
+#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR                  0x000000e0
+#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_E_TIMES_F                                    0x000000f0
+#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE2                                     0x000000a0
+#define    NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE3                                     0x000000b0
 #define   NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SHIFT                                                8
 #define   NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_MASK                                         0x00000f00
 #define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_ZERO                                                0x00000000
-#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR0_NV                          0x00000100
-#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR1_NV                          0x00000200
+#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR0                             0x00000100
+#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR1                             0x00000200
 #define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_FOG                                         0x00000300
-#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_PRIMARY_COLOR_NV                            0x00000400
-#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SECONDARY_COLOR_NV                          0x00000500
-#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE0_ARB                                        0x00000800
-#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE1_ARB                                        0x00000900
-#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0_NV                                   0x00000c00
-#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE1_NV                                   0x00000d00
-#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR_NV              0x00000e00
-#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_E_TIMES_F_NV                                        0x00000f00
-#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE2_ARB                                        0x00000a00
-#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE3_ARB                                        0x00000b00
+#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_PRIMARY_COLOR                               0x00000400
+#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SECONDARY_COLOR                             0x00000500
+#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE0                                    0x00000800
+#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE1                                    0x00000900
+#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0                                      0x00000c00
+#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE1                                      0x00000d00
+#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR                 0x00000e00
+#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_E_TIMES_F                                   0x00000f00
+#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE2                                    0x00000a00
+#define    NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE3                                    0x00000b00
 #define   NV20TCL_RC_OUT_ALPHA_CD_DOT_PRODUCT                                          (1 << 12)
 #define   NV20TCL_RC_OUT_ALPHA_AB_DOT_PRODUCT                                          (1 << 13)
 #define   NV20TCL_RC_OUT_ALPHA_MUX_SUM                                                 (1 << 14)
 #define   NV20TCL_RC_OUT_ALPHA_BIAS                                                    (1 << 15)
 #define    NV20TCL_RC_OUT_ALPHA_BIAS_NONE                                              0x00000000
-#define    NV20TCL_RC_OUT_ALPHA_BIAS_BIAS_BY_NEGATIVE_ONE_HALF_NV                      0x00008000
+#define    NV20TCL_RC_OUT_ALPHA_BIAS_BIAS_BY_NEGATIVE_ONE_HALF                         0x00008000
 #define   NV20TCL_RC_OUT_ALPHA_SCALE_SHIFT                                             17
 #define   NV20TCL_RC_OUT_ALPHA_SCALE_MASK                                              0x00000000
 #define    NV20TCL_RC_OUT_ALPHA_SCALE_NONE                                             0x00000000
-#define    NV20TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_TWO_NV                                  0x00020000
-#define    NV20TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_FOUR_NV                                 0x00040000
-#define    NV20TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_ONE_HALF_NV                             0x00060000
+#define    NV20TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_TWO                                     0x00020000
+#define    NV20TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_FOUR                                    0x00040000
+#define    NV20TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_ONE_HALF                                        0x00060000
 #define  NV20TCL_RC_IN_RGB(x)                                                          (0x00000ac0+((x)*4))
 #define  NV20TCL_RC_IN_RGB__SIZE                                                       0x00000008
 #define   NV20TCL_RC_IN_RGB_D_INPUT_SHIFT                                              0
 #define   NV20TCL_RC_IN_RGB_D_INPUT_MASK                                               0x0000000f
 #define    NV20TCL_RC_IN_RGB_D_INPUT_ZERO                                              0x00000000
-#define    NV20TCL_RC_IN_RGB_D_INPUT_CONSTANT_COLOR0_NV                                        0x00000001
-#define    NV20TCL_RC_IN_RGB_D_INPUT_CONSTANT_COLOR1_NV                                        0x00000002
+#define    NV20TCL_RC_IN_RGB_D_INPUT_CONSTANT_COLOR0                                   0x00000001
+#define    NV20TCL_RC_IN_RGB_D_INPUT_CONSTANT_COLOR1                                   0x00000002
 #define    NV20TCL_RC_IN_RGB_D_INPUT_FOG                                               0x00000003
-#define    NV20TCL_RC_IN_RGB_D_INPUT_PRIMARY_COLOR_NV                                  0x00000004
-#define    NV20TCL_RC_IN_RGB_D_INPUT_SECONDARY_COLOR_NV                                        0x00000005
-#define    NV20TCL_RC_IN_RGB_D_INPUT_TEXTURE0_ARB                                      0x00000008
-#define    NV20TCL_RC_IN_RGB_D_INPUT_TEXTURE1_ARB                                      0x00000009
-#define    NV20TCL_RC_IN_RGB_D_INPUT_SPARE0_NV                                         0x0000000c
-#define    NV20TCL_RC_IN_RGB_D_INPUT_SPARE1_NV                                         0x0000000d
-#define    NV20TCL_RC_IN_RGB_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR_NV                    0x0000000e
-#define    NV20TCL_RC_IN_RGB_D_INPUT_E_TIMES_F_NV                                      0x0000000f
-#define    NV20TCL_RC_IN_RGB_D_INPUT_TEXTURE2_ARB                                      0x0000000a
-#define    NV20TCL_RC_IN_RGB_D_INPUT_TEXTURE3_ARB                                      0x0000000b
+#define    NV20TCL_RC_IN_RGB_D_INPUT_PRIMARY_COLOR                                     0x00000004
+#define    NV20TCL_RC_IN_RGB_D_INPUT_SECONDARY_COLOR                                   0x00000005
+#define    NV20TCL_RC_IN_RGB_D_INPUT_TEXTURE0                                          0x00000008
+#define    NV20TCL_RC_IN_RGB_D_INPUT_TEXTURE1                                          0x00000009
+#define    NV20TCL_RC_IN_RGB_D_INPUT_SPARE0                                            0x0000000c
+#define    NV20TCL_RC_IN_RGB_D_INPUT_SPARE1                                            0x0000000d
+#define    NV20TCL_RC_IN_RGB_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR                       0x0000000e
+#define    NV20TCL_RC_IN_RGB_D_INPUT_E_TIMES_F                                         0x0000000f
+#define    NV20TCL_RC_IN_RGB_D_INPUT_TEXTURE2