summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorViktor Novotný <[email protected]>2010-11-01 01:26:05 +0100
committerFrancisco Jerez <[email protected]>2010-11-15 17:42:07 +0100
commitf4efc256fd90beaff86321e4c6ce00f9be55092d (patch)
treeb49d730b9a4ce49d85dd8b82ca6ccd5eb1cbc319 /src/mesa
parent8983855012301c8ebc023edf42ddf5e423189585 (diff)
dri/nouveau: nv10: Use rules-ng-ng headers
Signed-off-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_3d.xml.h5
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_context.c127
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_render.c42
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_fb.c33
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_frag.c36
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_polygon.c32
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_raster.c38
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_tex.c64
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_tnl.c82
9 files changed, 228 insertions, 231 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv10_3d.xml.h b/src/mesa/drivers/dri/nouveau/nv10_3d.xml.h
index 5bad9dc935c..cdc61f45733 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_3d.xml.h
+++ b/src/mesa/drivers/dri/nouveau/nv10_3d.xml.h
@@ -8,9 +8,8 @@ http://0x04.net/cgit/index.cgi/rules-ng-ng
git clone git://0x04.net/rules-ng-ng
The rules-ng-ng source files this header was generated from are:
-- nv20_3d.xml ( 21073 bytes, from 2010-11-15 02:24:38)
+- nv10_3d.xml ( 18437 bytes, from 2010-11-15 15:30:21)
- copyright.xml ( 6452 bytes, from 2010-11-15 15:10:58)
-- nv10_3d.xml ( 18449 bytes, from 2010-11-15 02:24:38)
- nv_defs.xml ( 4437 bytes, from 2010-11-01 00:28:46)
- nv_3ddefs.xml ( 16394 bytes, from 2010-11-01 00:28:46)
- nv_object.xml ( 11547 bytes, from 2010-11-13 23:32:57)
@@ -549,7 +548,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV10_3D_VTXBUF_FMT_FIELDS__SHIFT 4
#define NV10_3D_VTXBUF_FMT_STRIDE__MASK 0x0000ff00
#define NV10_3D_VTXBUF_FMT_STRIDE__SHIFT 8
-#define NV10_3D_VTXBUF_FMT_POS_HOMOGENEOUS 0x01000000
+#define NV10_3D_VTXBUF_FMT_HOMOGENEOUS 0x01000000
#define NV10_3D_VERTEX_BEGIN_END 0x00000dfc
#define NV10_3D_VERTEX_BEGIN_END_STOP 0x00000000
diff --git a/src/mesa/drivers/dri/nouveau/nv10_context.c b/src/mesa/drivers/dri/nouveau/nv10_context.c
index de2c93ec815..8074b4bb472 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_context.c
@@ -29,7 +29,8 @@
#include "nouveau_context.h"
#include "nouveau_fbo.h"
#include "nouveau_util.h"
-#include "nouveau_class.h"
+#include "nv_object.xml.h"
+#include "nv10_3d.xml.h"
#include "nv04_driver.h"
#include "nv10_driver.h"
@@ -157,9 +158,9 @@ nv17_zclear(struct gl_context *ctx, GLbitfield *buffers)
nfb->base._DepthBuffer->Wrapped)->surface;
/* Clear the hierarchical depth buffer */
- BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_FILL_VALUE, 1);
+ BEGIN_RING(chan, celsius, NV17_3D_HIERZ_FILL_VALUE, 1);
OUT_RING(chan, pack_zs_f(s->format, ctx->Depth.Clear, 0));
- BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_BUFFER_CLEAR, 1);
+ BEGIN_RING(chan, celsius, NV17_3D_HIERZ_BUFFER_CLEAR, 1);
OUT_RING(chan, 1);
/* Mark the depth buffer as cleared */
@@ -201,33 +202,33 @@ nv10_hwctx_init(struct gl_context *ctx)
struct nouveau_hw_state *hw = &to_nouveau_context(ctx)->hw;
int i;
- BEGIN_RING(chan, celsius, NV10TCL_DMA_NOTIFY, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_DMA_NOTIFY, 1);
OUT_RING(chan, hw->ntfy->handle);
- BEGIN_RING(chan, celsius, NV10TCL_DMA_IN_MEMORY0, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_DMA_TEXTURE0, 3);
OUT_RING(chan, chan->vram->handle);
OUT_RING(chan, chan->gart->handle);
OUT_RING(chan, chan->gart->handle);
- BEGIN_RING(chan, celsius, NV10TCL_DMA_IN_MEMORY2, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_DMA_COLOR, 2);
OUT_RING(chan, chan->vram->handle);
OUT_RING(chan, chan->vram->handle);
- BEGIN_RING(chan, celsius, NV10TCL_NOP, 1);
+ BEGIN_RING(chan, celsius, NV04_GRAPH_NOP, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_RT_HORIZ, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_RT_HORIZ, 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_CLIP_HORIZ(0), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_CLIP_HORIZ(0), 1);
OUT_RING(chan, 0x7ff << 16 | 0x800);
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_CLIP_VERT(0), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_CLIP_VERT(0), 1);
OUT_RING(chan, 0x7ff << 16 | 0x800);
for (i = 1; i < 8; i++) {
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_CLIP_HORIZ(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_CLIP_HORIZ(i), 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_CLIP_VERT(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_CLIP_VERT(i), 1);
OUT_RING(chan, 0);
}
@@ -236,18 +237,18 @@ nv10_hwctx_init(struct gl_context *ctx)
BEGIN_RING(chan, celsius, 0x3f4, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_NOP, 1);
+ BEGIN_RING(chan, celsius, NV04_GRAPH_NOP, 1);
OUT_RING(chan, 0);
if (context_chipset(ctx) >= 0x17) {
- BEGIN_RING(chan, celsius, NV17TCL_DMA_IN_MEMORY4, 2);
+ BEGIN_RING(chan, celsius, NV17_3D_UNK01AC, 2);
OUT_RING(chan, chan->vram->handle);
OUT_RING(chan, chan->vram->handle);
BEGIN_RING(chan, celsius, 0xd84, 1);
OUT_RING(chan, 0x3);
- BEGIN_RING(chan, celsius, NV17TCL_COLOR_MASK_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV17_3D_COLOR_MASK_ENABLE, 1);
OUT_RING(chan, 1);
}
@@ -257,41 +258,41 @@ nv10_hwctx_init(struct gl_context *ctx)
OUT_RING(chan, 1);
OUT_RING(chan, 2);
- BEGIN_RING(chan, celsius, NV10TCL_NOP, 1);
+ BEGIN_RING(chan, celsius, NV04_GRAPH_NOP, 1);
OUT_RING(chan, 0);
}
- BEGIN_RING(chan, celsius, NV10TCL_NOP, 1);
+ BEGIN_RING(chan, celsius, NV04_GRAPH_NOP, 1);
OUT_RING(chan, 0);
/* Set state */
- BEGIN_RING(chan, celsius, NV10TCL_FOG_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_FOG_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_ALPHA_FUNC_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_ALPHA_FUNC_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_ALPHA_FUNC_FUNC, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_ALPHA_FUNC_FUNC, 2);
OUT_RING(chan, 0x207);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_TX_ENABLE(0), 2);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_ENABLE(0), 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_BLEND_FUNC_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_BLEND_FUNC_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_DITHER_ENABLE, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_DITHER_ENABLE, 2);
OUT_RING(chan, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_LINE_SMOOTH_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LINE_SMOOTH_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_WEIGHT_ENABLE, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_WEIGHT_ENABLE, 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_BLEND_FUNC_SRC, 4);
+ BEGIN_RING(chan, celsius, NV10_3D_BLEND_FUNC_SRC, 4);
OUT_RING(chan, 1);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
OUT_RING(chan, 0x8006);
- BEGIN_RING(chan, celsius, NV10TCL_STENCIL_MASK, 8);
+ BEGIN_RING(chan, celsius, NV10_3D_STENCIL_MASK, 8);
OUT_RING(chan, 0xff);
OUT_RING(chan, 0x207);
OUT_RING(chan, 0);
@@ -300,105 +301,105 @@ nv10_hwctx_init(struct gl_context *ctx)
OUT_RING(chan, 0x1e00);
OUT_RING(chan, 0x1e00);
OUT_RING(chan, 0x1d01);
- BEGIN_RING(chan, celsius, NV10TCL_NORMALIZE_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_NORMALIZE_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_FOG_ENABLE, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_FOG_ENABLE, 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_MODEL, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_MODEL, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_SEPARATE_SPECULAR_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_SEPARATE_SPECULAR_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_ENABLED_LIGHTS, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_ENABLED_LIGHTS, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_OFFSET_POINT_ENABLE, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_OFFSET_POINT_ENABLE, 3);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_FUNC, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_FUNC, 1);
OUT_RING(chan, 0x201);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_WRITE_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_WRITE_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_TEST_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_TEST_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_OFFSET_FACTOR, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_OFFSET_FACTOR, 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_POINT_SIZE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_POINT_SIZE, 1);
OUT_RING(chan, 8);
- BEGIN_RING(chan, celsius, NV10TCL_POINT_PARAMETERS_ENABLE, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_POINT_PARAMETERS_ENABLE, 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_LINE_WIDTH, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LINE_WIDTH, 1);
OUT_RING(chan, 8);
- BEGIN_RING(chan, celsius, NV10TCL_LINE_SMOOTH_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LINE_SMOOTH_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_MODE_FRONT, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_MODE_FRONT, 2);
OUT_RING(chan, 0x1b02);
OUT_RING(chan, 0x1b02);
- BEGIN_RING(chan, celsius, NV10TCL_CULL_FACE, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_CULL_FACE, 2);
OUT_RING(chan, 0x405);
OUT_RING(chan, 0x901);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_SMOOTH_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_SMOOTH_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_CULL_FACE_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_CULL_FACE_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_TX_GEN_MODE_S(0), 8);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_GEN_MODE(0, 0), 8);
for (i = 0; i < 8; i++)
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_TX_MATRIX_ENABLE(0), 2);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_MATRIX_ENABLE(0), 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_FOG_EQUATION_CONSTANT, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_FOG_COEFF(0), 3);
OUT_RING(chan, 0x3fc00000); /* -1.50 */
OUT_RING(chan, 0xbdb8aa0a); /* -0.09 */
OUT_RING(chan, 0); /* 0.00 */
- BEGIN_RING(chan, celsius, NV10TCL_NOP, 1);
+ BEGIN_RING(chan, celsius, NV04_GRAPH_NOP, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_FOG_MODE, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_FOG_MODE, 2);
OUT_RING(chan, 0x802);
OUT_RING(chan, 2);
/* for some reason VIEW_MATRIX_ENABLE need to be 6 instead of 4 when
* using texturing, except when using the texture matrix
*/
- BEGIN_RING(chan, celsius, NV10TCL_VIEW_MATRIX_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEW_MATRIX_ENABLE, 1);
OUT_RING(chan, 6);
- BEGIN_RING(chan, celsius, NV10TCL_COLOR_MASK, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_COLOR_MASK, 1);
OUT_RING(chan, 0x01010101);
/* Set vertex component */
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_COL_4F_R, 4);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_COL_4F_R, 4);
OUT_RINGf(chan, 1.0);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 1.0);
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_COL2_3F_R, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_COL2_3F_R, 3);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_NOR_3F_X, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_NOR_3F_X, 3);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
OUT_RINGf(chan, 1.0);
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_TX0_4F_S, 4);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_TX0_4F_S, 4);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 1.0);
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_TX1_4F_S, 4);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_TX1_4F_S, 4);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 1.0);
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_FOG_1F, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_FOG_1F, 1);
OUT_RINGf(chan, 0.0);
- BEGIN_RING(chan, celsius, NV10TCL_EDGEFLAG_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_EDGEFLAG_ENABLE, 1);
OUT_RING(chan, 1);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_RANGE_NEAR, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_RANGE_NEAR, 2);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 16777216.0);
@@ -456,11 +457,11 @@ nv10_context_create(struct nouveau_screen *screen, const struct gl_config *visua
/* 3D engine. */
if (context_chipset(ctx) >= 0x17)
- celsius_class = NV17TCL;
+ celsius_class = NV17_3D;
else if (context_chipset(ctx) >= 0x11)
- celsius_class = NV11TCL;
+ celsius_class = NV11_3D;
else
- celsius_class = NV10TCL;
+ celsius_class = NV10_3D;
ret = nouveau_grobj_alloc(context_chan(ctx), 0xbeef0001, celsius_class,
&nctx->hw.eng3d);
diff --git a/src/mesa/drivers/dri/nouveau/nv10_render.c b/src/mesa/drivers/dri/nouveau/nv10_render.c
index 7115739b5aa..20fb4478426 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_render.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_render.c
@@ -26,7 +26,7 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
-#include "nouveau_class.h"
+#include "nv10_3d.xml.h"
#include "nv10_driver.h"
#define NUM_VERTEX_ATTRS 8
@@ -39,37 +39,37 @@ nv10_emit_material(struct gl_context *ctx, struct nouveau_array *a,
static struct nouveau_attr_info nv10_vertex_attrs[VERT_ATTRIB_MAX] = {
[VERT_ATTRIB_POS] = {
.vbo_index = 0,
- .imm_method = NV10TCL_VERTEX_POS_4F_X,
+ .imm_method = NV10_3D_VERTEX_POS_4F_X,
.imm_fields = 4,
},
[VERT_ATTRIB_COLOR0] = {
.vbo_index = 1,
- .imm_method = NV10TCL_VERTEX_COL_4F_R,
+ .imm_method = NV10_3D_VERTEX_COL_4F_R,
.imm_fields = 4,
},
[VERT_ATTRIB_COLOR1] = {
.vbo_index = 2,
- .imm_method = NV10TCL_VERTEX_COL2_3F_R,
+ .imm_method = NV10_3D_VERTEX_COL2_3F_R,
.imm_fields = 3,
},
[VERT_ATTRIB_TEX0] = {
.vbo_index = 3,
- .imm_method = NV10TCL_VERTEX_TX0_4F_S,
+ .imm_method = NV10_3D_VERTEX_TX0_4F_S,
.imm_fields = 4,
},
[VERT_ATTRIB_TEX1] = {
.vbo_index = 4,
- .imm_method = NV10TCL_VERTEX_TX1_4F_S,
+ .imm_method = NV10_3D_VERTEX_TX1_4F_S,
.imm_fields = 4,
},
[VERT_ATTRIB_NORMAL] = {
.vbo_index = 5,
- .imm_method = NV10TCL_VERTEX_NOR_3F_X,
+ .imm_method = NV10_3D_VERTEX_NOR_3F_X,
.imm_fields = 3,
},
[VERT_ATTRIB_FOG] = {
.vbo_index = 7,
- .imm_method = NV10TCL_VERTEX_FOG_1F,
+ .imm_method = NV10_3D_VERTEX_FOG_1F,
.imm_fields = 1,
},
[VERT_ATTRIB_GENERIC0] = {
@@ -94,12 +94,12 @@ get_hw_format(int type)
{
switch (type) {
case GL_FLOAT:
- return NV10TCL_VTXFMT_TYPE_FLOAT;
+ return NV10_3D_VTXBUF_FMT_TYPE_V32_FLOAT;
case GL_SHORT:
case GL_UNSIGNED_SHORT:
- return NV10TCL_VTXFMT_TYPE_SHORT;
+ return NV10_3D_VTXBUF_FMT_TYPE_V16_SNORM;
case GL_UNSIGNED_BYTE:
- return NV10TCL_VTXFMT_TYPE_BYTE_RGBA;
+ return NV10_3D_VTXBUF_FMT_TYPE_B8G8R8A8_UNORM;
default:
assert(0);
}
@@ -122,13 +122,13 @@ nv10_render_set_format(struct gl_context *ctx)
get_hw_format(a->type);
if (attr == VERT_ATTRIB_POS && a->fields == 4)
- hw_format |= NV10TCL_VTXFMT_POS_HOMOGENEOUS;
+ hw_format |= NV10_3D_VTXBUF_FMT_HOMOGENEOUS;
} else {
/* Unused attribute. */
- hw_format = NV10TCL_VTXFMT_TYPE_FLOAT;
+ hw_format = NV10_3D_VTXBUF_FMT_TYPE_V32_FLOAT;
}
- BEGIN_RING(chan, celsius, NV10TCL_VTXFMT(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VTXBUF_FMT(i), 1);
OUT_RING(chan, hw_format);
}
}
@@ -145,7 +145,7 @@ nv10_render_bind_vertices(struct gl_context *ctx)
struct nouveau_array *a = &render->attrs[attr];
nouveau_bo_markl(bctx, celsius,
- NV10TCL_VTXBUF_ADDRESS(i),
+ NV10_3D_VTXBUF_OFFSET(i),
a->bo, a->offset,
NOUVEAU_BO_GART | NOUVEAU_BO_RD);
}
@@ -156,33 +156,33 @@ nv10_render_bind_vertices(struct gl_context *ctx)
struct nouveau_grobj *celsius = context_eng3d(ctx)
#define BATCH_VALIDATE() \
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_ARRAY_VALIDATE, 1); \
+ BEGIN_RING(chan, celsius, NV10_3D_VTXBUF_VALIDATE, 1); \
OUT_RING(chan, 0)
#define BATCH_BEGIN(prim) \
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_BUFFER_BEGIN_END, 1); \
+ BEGIN_RING(chan, celsius, NV10_3D_VTXBUF_BEGIN_END, 1); \
OUT_RING(chan, prim)
#define BATCH_END() \
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_BUFFER_BEGIN_END, 1); \
+ BEGIN_RING(chan, celsius, NV10_3D_VTXBUF_BEGIN_END, 1); \
OUT_RING(chan, 0)
#define MAX_PACKET 0x400
#define MAX_OUT_L 0x100
#define BATCH_PACKET_L(n) \
- BEGIN_RING_NI(chan, celsius, NV10TCL_VERTEX_BUFFER_DRAW_ARRAYS, n)
+ BEGIN_RING_NI(chan, celsius, NV10_3D_VTXBUF_BATCH, n)
#define BATCH_OUT_L(i, n) \
OUT_RING(chan, ((n) - 1) << 24 | (i))
#define MAX_OUT_I16 0x2
#define BATCH_PACKET_I16(n) \
- BEGIN_RING_NI(chan, celsius, NV10TCL_VB_ELEMENT_U16, n)
+ BEGIN_RING_NI(chan, celsius, NV10_3D_VTXBUF_ELEMENT_U16, n)
#define BATCH_OUT_I16(i0, i1) \
OUT_RING(chan, (i1) << 16 | (i0))
#define MAX_OUT_I32 0x1
#define BATCH_PACKET_I32(n) \
- BEGIN_RING_NI(chan, celsius, NV10TCL_VB_ELEMENT_U32, n)
+ BEGIN_RING_NI(chan, celsius, NV10_3D_VTXBUF_ELEMENT_U32, n)
#define BATCH_OUT_I32(i) \
OUT_RING(chan, i)
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
index 0fda9faf49b..63f5f74ff5a 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
@@ -27,7 +27,8 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_fbo.h"
-#include "nouveau_class.h"
+#include "nv_object.xml.h"
+#include "nv10_3d.xml.h"
#include "nouveau_util.h"
#include "nv10_driver.h"
@@ -68,20 +69,20 @@ setup_hierz_buffer(struct gl_context *ctx)
0, NOUVEAU_BO_TILE_ZETA, &nfb->hierz.bo);
}
- nouveau_bo_markl(bctx, celsius, NV17TCL_LMA_DEPTH_BUFFER_OFFSET,
+ nouveau_bo_markl(bctx, celsius, NV17_3D_HIERZ_OFFSET,
nfb->hierz.bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
WAIT_RING(chan, 9);
- BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_WINDOW_X, 4);
+ BEGIN_RING(chan, celsius, NV17_3D_HIERZ_WINDOW_X, 4);
OUT_RINGf(chan, - 1792);
OUT_RINGf(chan, - 2304 + fb->Height);
OUT_RINGf(chan, fb->_DepthMaxF / 2);
OUT_RINGf(chan, 0);
- BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_BUFFER_PITCH, 1);
+ BEGIN_RING(chan, celsius, NV17_3D_HIERZ_PITCH, 1);
OUT_RING(chan, pitch);
- BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV17_3D_HIERZ_ENABLE, 1);
OUT_RING(chan, 1);
}
@@ -93,7 +94,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
struct nouveau_bo_context *bctx = context_bctx(ctx, FRAMEBUFFER);
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct nouveau_surface *s;
- unsigned rt_format = NV10TCL_RT_FORMAT_TYPE_LINEAR;
+ unsigned rt_format = NV10_3D_RT_FORMAT_TYPE_LINEAR;
unsigned rt_pitch = 0, zeta_pitch = 0;
unsigned bo_flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR;
@@ -106,7 +107,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
int i;
for (i = 0; i < 6; i++) {
- BEGIN_RING(chan, celsius, NV10TCL_NOP, 1);
+ BEGIN_RING(chan, celsius, NV04_GRAPH_NOP, 1);
OUT_RING(chan, 0);
}
}
@@ -119,7 +120,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
rt_format |= get_rt_format(s->format);
zeta_pitch = rt_pitch = s->pitch;
- nouveau_bo_markl(bctx, celsius, NV10TCL_COLOR_OFFSET,
+ nouveau_bo_markl(bctx, celsius, NV10_3D_COLOR_OFFSET,
s->bo, 0, bo_flags);
}
@@ -131,7 +132,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
rt_format |= get_rt_format(s->format);
zeta_pitch = s->pitch;
- nouveau_bo_markl(bctx, celsius, NV10TCL_ZETA_OFFSET,
+ nouveau_bo_markl(bctx, celsius, NV10_3D_ZETA_OFFSET,
s->bo, 0, bo_flags);
if (context_chipset(ctx) >= 0x17) {
@@ -140,7 +141,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
}
}
- BEGIN_RING(chan, celsius, NV10TCL_RT_FORMAT, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_RT_FORMAT, 2);
OUT_RING(chan, rt_format);
OUT_RING(chan, zeta_pitch << 16 | rt_pitch);
@@ -162,7 +163,7 @@ nv10_emit_scissor(struct gl_context *ctx, int emit)
get_scissors(ctx->DrawBuffer, &x, &y, &w, &h);
- BEGIN_RING(chan, celsius, NV10TCL_RT_HORIZ, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_RT_HORIZ, 2);
OUT_RING(chan, w << 16 | x);
OUT_RING(chan, h << 16 | y);
}
@@ -182,12 +183,12 @@ nv10_emit_viewport(struct gl_context *ctx, int emit)
if (nv10_use_viewport_zclear(ctx))
a[2] = nv10_transform_depth(ctx, (vp->Far + vp->Near) / 2);
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_TRANSLATE_X, 4);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_TRANSLATE_X, 4);
OUT_RINGp(chan, a, 4);
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_CLIP_HORIZ(0), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_CLIP_HORIZ(0), 1);
OUT_RING(chan, (fb->Width - 1) << 16 | 0x08000800);
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_CLIP_VERT(0), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_CLIP_VERT(0), 1);
OUT_RING(chan, (fb->Height - 1) << 16 | 0x08000800);
context_dirty(ctx, PROJECTION);
@@ -203,12 +204,12 @@ nv10_emit_zclear(struct gl_context *ctx, int emit)
to_nouveau_framebuffer(ctx->DrawBuffer);
if (nfb->hierz.bo) {
- BEGIN_RING(chan, celsius, NV17TCL_ZCLEAR_ENABLE, 2);
+ BEGIN_RING(chan, celsius, NV17_3D_ZCLEAR_ENABLE, 2);
OUT_RING(chan, nctx->hierz.clear_blocked ? 0 : 1);
OUT_RING(chan, nfb->hierz.clear_value |
(nctx->hierz.clear_seq & 0xff));
} else {
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_RANGE_NEAR, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_RANGE_NEAR, 2);
OUT_RINGf(chan, nv10_transform_depth(ctx, 0));
OUT_RINGf(chan, nv10_transform_depth(ctx, 1));
context_dirty(ctx, VIEWPORT);
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
index 5138c36df7b..1adc86086cc 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
@@ -27,7 +27,7 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
-#include "nouveau_class.h"
+#include "nv10_3d.xml.h"
#include "nouveau_util.h"
#include "nv10_driver.h"
#include "nv20_driver.h"
@@ -41,24 +41,24 @@
#define RC_IN_SHIFT_G 40
#define RC_IN_SOURCE(source) \
- ((uint64_t)NV10TCL_RC_IN_RGB_D_INPUT_##source)
+ ((uint64_t)NV10_3D_RC_IN_RGB_D_INPUT_##source)
#define RC_IN_USAGE(usage) \
- ((uint64_t)NV10TCL_RC_IN_RGB_D_COMPONENT_USAGE_##usage)
+ ((uint64_t)NV10_3D_RC_IN_RGB_D_COMPONENT_USAGE_##usage)
#define RC_IN_MAPPING(mapping) \
- ((uint64_t)NV10TCL_RC_IN_RGB_D_MAPPING_##mapping)
+ ((uint64_t)NV10_3D_RC_IN_RGB_D_MAPPING_##mapping)
-#define RC_OUT_BIAS NV10TCL_RC_OUT_RGB_BIAS_BIAS_BY_NEGATIVE_ONE_HALF
-#define RC_OUT_SCALE_1 NV10TCL_RC_OUT_RGB_SCALE_NONE
-#define RC_OUT_SCALE_2 NV10TCL_RC_OUT_RGB_SCALE_SCALE_BY_TWO
-#define RC_OUT_SCALE_4 NV10TCL_RC_OUT_RGB_SCALE_SCALE_BY_FOUR
+#define RC_OUT_BIAS NV10_3D_RC_OUT_RGB_BIAS_BIAS_BY_NEGATIVE_ONE_HALF
+#define RC_OUT_SCALE_1 NV10_3D_RC_OUT_RGB_SCALE_NONE
+#define RC_OUT_SCALE_2 NV10_3D_RC_OUT_RGB_SCALE_SCALE_BY_TWO
+#define RC_OUT_SCALE_4 NV10_3D_RC_OUT_RGB_SCALE_SCALE_BY_FOUR
/* Make the combiner do: spare0_i = A_i * B_i */
-#define RC_OUT_AB NV10TCL_RC_OUT_RGB_AB_OUTPUT_SPARE0
+#define RC_OUT_AB NV10_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0
/* spare0_i = dot3(A, B) */
-#define RC_OUT_DOT_AB (NV10TCL_RC_OUT_RGB_AB_OUTPUT_SPARE0 | \
- NV10TCL_RC_OUT_RGB_AB_DOT_PRODUCT)
+#define RC_OUT_DOT_AB (NV10_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0 | \
+ NV10_3D_RC_OUT_RGB_AB_DOT_PRODUCT)
/* spare0_i = A_i * B_i + C_i * D_i */
-#define RC_OUT_SUM NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE0
+#define RC_OUT_SUM NV10_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE0
struct combiner_state {
struct gl_context *ctx;
@@ -383,15 +383,15 @@ nv10_emit_tex_env(struct gl_context *ctx, int emit)
c_out |= 0x3 << 27;
}
- BEGIN_RING(chan, celsius, NV10TCL_RC_IN_ALPHA(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_RC_IN_ALPHA(i), 1);
OUT_RING(chan, a_in);
- BEGIN_RING(chan, celsius, NV10TCL_RC_IN_RGB(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_RC_IN_RGB(i), 1);
OUT_RING(chan, c_in);
- BEGIN_RING(chan, celsius, NV10TCL_RC_COLOR(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_RC_COLOR(i), 1);
OUT_RING(chan, k);
- BEGIN_RING(chan, celsius, NV10TCL_RC_OUT_ALPHA(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_RC_OUT_ALPHA(i), 1);
OUT_RING(chan, a_out);
- BEGIN_RING(chan, celsius, NV10TCL_RC_OUT_RGB(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_RC_OUT_RGB(i), 1);
OUT_RING(chan, c_out);
context_dirty(ctx, FRAG);
@@ -407,7 +407,7 @@ nv10_emit_frag(struct gl_context *ctx, int emit)
nv10_get_final_combiner(ctx, &in, &n);
- BEGIN_RING(chan, celsius, NV10TCL_RC_FINAL0, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_RC_FINAL0, 2);
OUT_RING(chan, in);
OUT_RING(chan, in >> 32);
}
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c b/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c
index 4e49b0278cd..f0f7dd2422b 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c
@@ -27,7 +27,7 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
-#include "nouveau_class.h"
+#include "nv10_3d.xml.h"
#include "nv10_driver.h"
void
@@ -37,13 +37,13 @@ nv10_emit_cull_face(struct gl_context *ctx, int emit)
struct nouveau_grobj *celsius = context_eng3d(ctx);
GLenum mode = ctx->Polygon.CullFaceMode;
- BEGIN_RING(chan, celsius, NV10TCL_CULL_FACE_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_CULL_FACE_ENABLE, 1);
OUT_RING(chan, ctx->Polygon.CullFlag ? 1 : 0);
- BEGIN_RING(chan, celsius, NV10TCL_CULL_FACE, 1);
- OUT_RING(chan, (mode == GL_FRONT ? NV10TCL_CULL_FACE_FRONT :
- mode == GL_BACK ? NV10TCL_CULL_FACE_BACK :
- NV10TCL_CULL_FACE_FRONT_AND_BACK));
+ BEGIN_RING(chan, celsius, NV10_3D_CULL_FACE, 1);
+ OUT_RING(chan, (mode == GL_FRONT ? NV10_3D_CULL_FACE_FRONT :
+ mode == GL_BACK ? NV10_3D_CULL_FACE_BACK :
+ NV10_3D_CULL_FACE_FRONT_AND_BACK));
}
void
@@ -52,9 +52,9 @@ nv10_emit_front_face(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_FRONT_FACE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_FRONT_FACE, 1);
OUT_RING(chan, ctx->Polygon.FrontFace == GL_CW ?
- NV10TCL_FRONT_FACE_CW : NV10TCL_FRONT_FACE_CCW);
+ NV10_3D_FRONT_FACE_CW : NV10_3D_FRONT_FACE_CCW);
}
void
@@ -65,10 +65,10 @@ nv10_emit_line_mode(struct gl_context *ctx, int emit)
GLboolean smooth = ctx->Line.SmoothFlag &&
ctx->Hint.LineSmooth == GL_NICEST;
- BEGIN_RING(chan, celsius, NV10TCL_LINE_WIDTH, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LINE_WIDTH, 1);
OUT_RING(chan, MAX2(smooth ? 0 : 1,
ctx->Line.Width) * 8);
- BEGIN_RING(chan, celsius, NV10TCL_LINE_SMOOTH_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LINE_SMOOTH_ENABLE, 1);
OUT_RING(chan, smooth ? 1 : 0);
}
@@ -83,10 +83,10 @@ nv10_emit_point_mode(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_POINT_SIZE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_POINT_SIZE, 1);
OUT_RING(chan, (uint32_t)(ctx->Point.Size * 8));
- BEGIN_RING(chan, celsius, NV10TCL_POINT_SMOOTH_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_POINT_SMOOTH_ENABLE, 1);
OUT_RING(chan, ctx->Point.SmoothFlag ? 1 : 0);
}
@@ -96,11 +96,11 @@ nv10_emit_polygon_mode(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_MODE_FRONT, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_MODE_FRONT, 2);
OUT_RING(chan, nvgl_polygon_mode(ctx->Polygon.FrontMode));
OUT_RING(chan, nvgl_polygon_mode(ctx->Polygon.BackMode));
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_SMOOTH_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_SMOOTH_ENABLE, 1);
OUT_RING(chan, ctx->Polygon.SmoothFlag ? 1 : 0);
}
@@ -110,12 +110,12 @@ nv10_emit_polygon_offset(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_OFFSET_POINT_ENABLE, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_OFFSET_POINT_ENABLE, 3);
OUT_RING(chan, ctx->Polygon.OffsetPoint ? 1 : 0);
OUT_RING(chan, ctx->Polygon.OffsetLine ? 1 : 0);
OUT_RING(chan, ctx->Polygon.OffsetFill ? 1 : 0);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_OFFSET_FACTOR, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_OFFSET_FACTOR, 2);
OUT_RINGf(chan, ctx->Polygon.OffsetFactor);
OUT_RINGf(chan, ctx->Polygon.OffsetUnits);
}
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
index 99609844a18..92153911e8a 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
@@ -27,7 +27,7 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
-#include "nouveau_class.h"
+#include "nv10_3d.xml.h"
#include "nv10_driver.h"
void
@@ -36,10 +36,10 @@ nv10_emit_alpha_func(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_ALPHA_FUNC_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_ALPHA_FUNC_ENABLE, 1);
OUT_RING(chan, ctx->Color.AlphaEnabled ? 1 : 0);
- BEGIN_RING(chan, celsius, NV10TCL_ALPHA_FUNC_FUNC, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_ALPHA_FUNC_FUNC, 2);
OUT_RING(chan, nvgl_comparison_op(ctx->Color.AlphaFunc));
OUT_RING(chan, FLOAT_TO_UBYTE(ctx->Color.AlphaRef));
}
@@ -50,7 +50,7 @@ nv10_emit_blend_color(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_BLEND_COLOR, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_BLEND_COLOR, 1);
OUT_RING(chan, FLOAT_TO_UBYTE(ctx->Color.BlendColor[3]) << 24 |
FLOAT_TO_UBYTE(ctx->Color.BlendColor[0]) << 16 |
FLOAT_TO_UBYTE(ctx->Color.BlendColor[1]) << 8 |
@@ -63,10 +63,10 @@ nv10_emit_blend_equation(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_BLEND_FUNC_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_BLEND_FUNC_ENABLE, 1);
OUT_RING(chan, ctx->Color.BlendEnabled ? 1 : 0);
- BEGIN_RING(chan, celsius, NV10TCL_BLEND_EQUATION, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_BLEND_EQUATION, 1);
OUT_RING(chan, nvgl_blend_eqn(ctx->Color.BlendEquationRGB));
}
@@ -76,7 +76,7 @@ nv10_emit_blend_func(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_BLEND_FUNC_SRC, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_BLEND_FUNC_SRC, 2);
OUT_RING(chan, nvgl_blend_func(ctx->Color.BlendSrcRGB));
OUT_RING(chan, nvgl_blend_func(ctx->Color.BlendDstRGB));
}
@@ -87,7 +87,7 @@ nv10_emit_color_mask(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_COLOR_MASK, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_COLOR_MASK, 1);
OUT_RING(chan, ((ctx->Color.ColorMask[0][3] ? 1 << 24 : 0) |
(ctx->Color.ColorMask[0][0] ? 1 << 16 : 0) |
(ctx->Color.ColorMask[0][1] ? 1 << 8 : 0) |
@@ -100,11 +100,11 @@ nv10_emit_depth(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_TEST_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_TEST_ENABLE, 1);
OUT_RING(chan, ctx->Depth.Test ? 1 : 0);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_WRITE_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_WRITE_ENABLE, 1);
OUT_RING(chan, ctx->Depth.Mask ? 1 : 0);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_FUNC, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_FUNC, 1);
OUT_RING(chan, nvgl_comparison_op(ctx->Depth.Func));
}
@@ -114,7 +114,7 @@ nv10_emit_dither(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_DITHER_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_DITHER_ENABLE, 1);
OUT_RING(chan, ctx->Color.DitherFlag ? 1 : 0);
}
@@ -127,7 +127,7 @@ nv10_emit_logic_opcode(struct gl_context *ctx, int emit)
assert(!ctx->Color.ColorLogicOpEnabled
|| context_chipset(ctx) >= 0x11);
- BEGIN_RING(chan, celsius, NV11TCL_COLOR_LOGIC_OP_ENABLE, 2);
+ BEGIN_RING(chan, celsius, NV11_3D_COLOR_LOGIC_OP_ENABLE, 2);
OUT_RING(chan, ctx->Color.ColorLogicOpEnabled ? 1 : 0);
OUT_RING(chan, nvgl_logicop_func(ctx->Color.LogicOp));
}
@@ -138,9 +138,9 @@ nv10_emit_shade_model(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_SHADE_MODEL, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_SHADE_MODEL, 1);
OUT_RING(chan, ctx->Light.ShadeModel == GL_SMOOTH ?
- NV10TCL_SHADE_MODEL_SMOOTH : NV10TCL_SHADE_MODEL_FLAT);
+ NV10_3D_SHADE_MODEL_SMOOTH : NV10_3D_SHADE_MODEL_FLAT);
}
void
@@ -149,10 +149,10 @@ nv10_emit_stencil_func(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_STENCIL_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_STENCIL_ENABLE, 1);
OUT_RING(chan, ctx->Stencil.Enabled ? 1 : 0);
- BEGIN_RING(chan, celsius, NV10TCL_STENCIL_FUNC_FUNC, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_STENCIL_FUNC_FUNC, 3);
OUT_RING(chan, nvgl_comparison_op(ctx->Stencil.Function[0]));
OUT_RING(chan, ctx->Stencil.Ref[0]);
OUT_RING(chan, ctx->Stencil.ValueMask[0]);
@@ -164,7 +164,7 @@ nv10_emit_stencil_mask(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_STENCIL_MASK, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_STENCIL_MASK, 1);
OUT_RING(chan, ctx->Stencil.WriteMask[0]);
}
@@ -174,7 +174,7 @@ nv10_emit_stencil_op(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_STENCIL_OP_FAIL, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_STENCIL_OP_FAIL, 3);
OUT_RING(chan, nvgl_stencil_op(ctx->Stencil.FailFunc[0]));
OUT_RING(chan, nvgl_stencil_op(ctx->Stencil.ZFailFunc[0]));
OUT_RING(chan, nvgl_stencil_op(ctx->Stencil.ZPassFunc[0]));
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
index 0092ad0c20c..fda67b15073 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
@@ -28,14 +28,10 @@
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
#include "nouveau_texture.h"
-#include "nouveau_class.h"
+#include "nv10_3d.xml.h"
#include "nouveau_util.h"
#include "nv10_driver.h"
-#define TX_GEN_MODE(i, j) (NV10TCL_TX_GEN_MODE_S(i) + 4 * (j))
-#define TX_GEN_COEFF(i, j) (NV10TCL_TX_GEN_COEFF_S_A(i) + 16 * (j))
-#define TX_MATRIX(i) (NV10TCL_TX0_MATRIX(0) + 64 * (i))
-
void
nv10_emit_tex_gen(struct gl_context *ctx, int emit)
{
@@ -53,15 +49,15 @@ nv10_emit_tex_gen(struct gl_context *ctx, int emit)
if (k) {
BEGIN_RING(chan, celsius,
- TX_GEN_COEFF(i, j), 4);
+ NV10_3D_TEX_GEN_COEFF(i, j), 4);
OUT_RINGp(chan, k, 4);
}
- BEGIN_RING(chan, celsius, TX_GEN_MODE(i, j), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_GEN_MODE(i,j), 1);
OUT_RING(chan, nvgl_texgen_mode(coord->Mode));
} else {
- BEGIN_RING(chan, celsius, TX_GEN_MODE(i, j), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_GEN_MODE(i,j), 1);
OUT_RING(chan, 0);
}
}
@@ -80,14 +76,14 @@ nv10_emit_tex_mat(struct gl_context *ctx, int emit)
if (nctx->fallback == HWTNL &&
((ctx->Texture._TexMatEnabled & 1 << i) ||
ctx->Texture.Unit[i]._GenFlags)) {
- BEGIN_RING(chan, celsius, NV10TCL_TX_MATRIX_ENABLE(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_MATRIX_ENABLE(i), 1);
OUT_RING(chan, 1);
- BEGIN_RING(chan, celsius, TX_MATRIX(i), 16);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_MATRIX(i, 0), 16);
OUT_RINGm(chan, ctx->TextureMatrixStack[i].Top->m);
} else {
- BEGIN_RING(chan, celsius, NV10TCL_TX_MATRIX_ENABLE(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_MATRIX_ENABLE(i), 1);
OUT_RING(chan, 0);
}
}
@@ -97,29 +93,29 @@ get_tex_format_pot(struct gl_texture_image *ti)
{
switch (ti->TexFormat) {
case MESA_FORMAT_ARGB8888:
- return NV10TCL_TX_FORMAT_FORMAT_A8R8G8B8;
+ return NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8;
case MESA_FORMAT_XRGB8888:
- return NV10TCL_TX_FORMAT_FORMAT_X8R8G8B8;
+ return NV10_3D_TEX_FORMAT_FORMAT_X8R8G8B8;
case MESA_FORMAT_ARGB1555:
- return NV10TCL_TX_FORMAT_FORMAT_A1R5G5B5;
+ return NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5;
case MESA_FORMAT_ARGB4444:
- return NV10TCL_TX_FORMAT_FORMAT_A4R4G4B4;
+ return NV10_3D_TEX_FORMAT_FORMAT_A4R4G4B4;
case MESA_FORMAT_RGB565:
- return NV10TCL_TX_FORMAT_FORMAT_R5G6B5;
+ return NV10_3D_TEX_FORMAT_FORMAT_R5G6B5;
case MESA_FORMAT_A8:
case MESA_FORMAT_I8:
- return NV10TCL_TX_FORMAT_FORMAT_A8;
+ return NV10_3D_TEX_FORMAT_FORMAT_I8;
case MESA_FORMAT_L8:
- return NV10TCL_TX_FORMAT_FORMAT_L8;
+ return NV10_3D_TEX_FORMAT_FORMAT_L8;
case MESA_FORMAT_CI8:
- return NV10TCL_TX_FORMAT_FORMAT_INDEX8;
+ return NV10_3D_TEX_FORMAT_FORMAT_INDEX8;
default:
assert(0);
@@ -131,19 +127,19 @@ get_tex_format_rect(struct gl_texture_image *ti)
{
switch (ti->TexFormat) {
case MESA_FORMAT_ARGB1555:
- return NV10TCL_TX_FORMAT_FORMAT_A1R5G5B5_RECT;
+ return NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT;
case MESA_FORMAT_RGB565:
- return NV10TCL_TX_FORMAT_FORMAT_R5G6B5_RECT;
+ return NV10_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT;
case MESA_FORMAT_ARGB8888:
case MESA_FORMAT_XRGB8888:
- return NV10TCL_TX_FORMAT_FORMAT_A8R8G8B8_RECT;
+ return NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT;
case MESA_FORMAT_A8:
case MESA_FORMAT_L8:
case MESA_FORMAT_I8:
- return NV10TCL_TX_FORMAT_FORMAT_A8_RECT;
+ return NV10_3D_TEX_FORMAT_FORMAT_I8_RECT;
default:
assert(0);
@@ -164,7 +160,7 @@ nv10_emit_tex_obj(struct gl_context *ctx, int emit)
uint32_t tx_format, tx_filter, tx_enable;
if (!ctx->Texture.Unit[i]._ReallyEnabled) {
- BEGIN_RING(chan, celsius, NV10TCL_TX_ENABLE(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_ENABLE(i), 1);
OUT_RING(chan, 0);
return;
}
@@ -186,13 +182,13 @@ nv10_emit_tex_obj(struct gl_context *ctx, int emit)
tx_filter = nvgl_filter_mode(t->MagFilter) << 28
| nvgl_filter_mode(t->MinFilter) << 24;
- tx_enable = NV10TCL_TX_ENABLE_ENABLE
+ tx_enable = NV10_3D_TEX_ENABLE_ENABLE
| log2i(t->MaxAnisotropy) << 4;
if (t->Target == GL_TEXTURE_RECTANGLE) {
- BEGIN_RING(chan, celsius, NV10TCL_TX_NPOT_PITCH(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_NPOT_PITCH(i), 1);
OUT_RING(chan, s->pitch << 16);
- BEGIN_RING(chan, celsius, NV10TCL_TX_NPOT_SIZE(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_NPOT_SIZE(i), 1);
OUT_RING(chan, align(s->width, 2) << 16 | s->height);
tx_format |= get_tex_format_rect(ti);
@@ -211,26 +207,26 @@ nv10_emit_tex_obj(struct gl_context *ctx, int emit)
lod_min = CLAMP(lod_min, 0, 15);
lod_bias = CLAMP(lod_bias, 0, 15);
- tx_format |= NV10TCL_TX_FORMAT_MIPMAP;
+ tx_format |= NV10_3D_TEX_FORMAT_MIPMAP;
tx_filter |= lod_bias << 8;
tx_enable |= lod_min << 26
| lod_max << 14;
}
/* Write it to the hardware. */
- nouveau_bo_mark(bctx, celsius, NV10TCL_TX_FORMAT(i),
+ nouveau_bo_mark(bctx, celsius, NV10_3D_TEX_FORMAT(i),
s->bo, tx_format, 0,
- NV10TCL_TX_FORMAT_DMA0,
- NV10TCL_TX_FORMAT_DMA1,
+ NV10_3D_TEX_FORMAT_DMA0,
+ NV10_3D_TEX_FORMAT_DMA1,
bo_flags | NOUVEAU_BO_OR);
- nouveau_bo_markl(bctx, celsius, NV10TCL_TX_OFFSET(i),
+ nouveau_bo_markl(bctx, celsius, NV10_3D_TEX_OFFSET(i),
s->bo, s->offset, bo_flags);
- BEGIN_RING(chan, celsius, NV10TCL_TX_FILTER(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_FILTER(i), 1);
OUT_RING(chan, tx_filter);
- BEGIN_RING(chan, celsius, NV10TCL_TX_ENABLE(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_ENABLE(i), 1);
OUT_RING(chan, tx_enable);
}
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
index 175abfca5c1..b9d07c11295 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
@@ -28,7 +28,7 @@
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
#include "nouveau_util.h"
-#include "nouveau_class.h"
+#include "nv10_3d.xml.h"
#include "nv10_driver.h"
void
@@ -42,13 +42,13 @@ get_material_bitmask(unsigned m)
unsigned ret = 0;
if (m & MAT_BIT_FRONT_EMISSION)
- ret |= NV10TCL_COLOR_MATERIAL_EMISSION;
+ ret |= NV10_3D_COLOR_MATERIAL_EMISSION;
if (m & MAT_BIT_FRONT_AMBIENT)
- ret |= NV10TCL_COLOR_MATERIAL_AMBIENT;
+ ret |= NV10_3D_COLOR_MATERIAL_AMBIENT;
if (m & MAT_BIT_FRONT_DIFFUSE)
- ret |= NV10TCL_COLOR_MATERIAL_DIFFUSE;
+ ret |= NV10_3D_COLOR_MATERIAL_DIFFUSE;
if (m & MAT_BIT_FRONT_SPECULAR)
- ret |= NV10TCL_COLOR_MATERIAL_SPECULAR;
+ ret |= NV10_3D_COLOR_MATERIAL_SPECULAR;
return ret;
}
@@ -60,7 +60,7 @@ nv10_emit_color_material(struct gl_context *ctx, int emit)
struct nouveau_grobj *celsius = context_eng3d(ctx);
unsigned mask = get_material_bitmask(ctx->Light.ColorMaterialBitmask);
- BEGIN_RING(chan, celsius, NV10TCL_COLOR_MATERIAL, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_COLOR_MATERIAL, 1);
OUT_RING(chan, ctx->Light.ColorMaterialEnabled ? mask : 0);
}
@@ -69,11 +69,11 @@ get_fog_mode(unsigned mode)
{
switch (mode) {
case GL_LINEAR:
- return NV10TCL_FOG_MODE_LINEAR;
+ return NV10_3D_FOG_MODE_LINEAR;
case GL_EXP:
- return NV10TCL_FOG_MODE_EXP;
+ return NV10_3D_FOG_MODE_EXP;
case GL_EXP2:
- return NV10TCL_FOG_MODE_EXP2;
+ return NV10_3D_FOG_MODE_EXP2;
default:
assert(0);
}
@@ -84,9 +84,9 @@ get_fog_source(unsigned source)
{
switch (source) {
case GL_FOG_COORDINATE_EXT:
- return NV10TCL_FOG_COORD_FOG;
+ return NV10_3D_FOG_COORD_FOG;
case GL_FRAGMENT_DEPTH_EXT:
- return NV10TCL_FOG_COORD_DIST_ORTHOGONAL_ABS;
+ return NV10_3D_FOG_COORD_DIST_ORTHOGONAL_ABS;
default:
assert(0);
}
@@ -133,13 +133,13 @@ nv10_emit_fog(struct gl_context *ctx, int emit)
nv10_get_fog_coeff(ctx, k);
- BEGIN_RING(chan, celsius, NV10TCL_FOG_MODE, 4);
+ BEGIN_RING(chan, celsius, NV10_3D_FOG_MODE, 4);
OUT_RING(chan, get_fog_mode(f->Mode));
OUT_RING(chan, get_fog_source(source));
OUT_RING(chan, f->Enabled ? 1 : 0);
OUT_RING(chan, pack_rgba_f(MESA_FORMAT_RGBA8888_REV, f->Color));
- BEGIN_RING(chan, celsius, NV10TCL_FOG_EQUATION_CONSTANT, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_FOG_COEFF(0), 3);
OUT_RINGp(chan, k, 3);
context_dirty(ctx, FRAG);
@@ -150,13 +150,13 @@ get_light_mode(struct gl_light *l)
{
if (l->Enabled) {
if (l->_Flags & LIGHT_SPOT)
- return NV10TCL_ENABLED_LIGHTS_0_DIRECTIONAL;
+ return NV10_3D_ENABLED_LIGHTS_0_DIRECTIONAL;
else if (l->_Flags & LIGHT_POSITIONAL)
- return NV10TCL_ENABLED_LIGHTS_0_POSITIONAL;
+ return NV10_3D_ENABLED_LIGHTS_0_POSITIONAL;
else
- return NV10TCL_ENABLED_LIGHTS_0_NONPOSITIONAL;
+ return NV10_3D_ENABLED_LIGHTS_0_NONPOSITIONAL;
} else {
- return NV10TCL_ENABLED_LIGHTS_0_DISABLED;
+ return NV10_3D_ENABLED_LIGHTS_0_DISABLED;
}
}
@@ -170,7 +170,7 @@ nv10_emit_light_enable(struct gl_context *ctx, int emit)
int i;
if (nctx->fallback != HWTNL) {
- BEGIN_RING(chan, celsius, NV10TCL_LIGHTING_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHTING_ENABLE, 1);
OUT_RING(chan, 0);
return;
}
@@ -178,11 +178,11 @@ nv10_emit_light_enable(struct gl_context *ctx, int emit)
for (i = 0; i < MAX_LIGHTS; i++)
en_lights |= get_light_mode(&ctx->Light.Light[i]) << 2 * i;
- BEGIN_RING(chan, celsius, NV10TCL_ENABLED_LIGHTS, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_ENABLED_LIGHTS, 1);
OUT_RING(chan, en_lights);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHTING_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHTING_ENABLE, 1);
OUT_RING(chan, ctx->Light.Enabled ? 1 : 0);
- BEGIN_RING(chan, celsius, NV10TCL_NORMALIZE_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_NORMALIZE_ENABLE, 1);
OUT_RING(chan, ctx->Transform.Normalize ? 1 : 0);
}
@@ -193,16 +193,16 @@ nv10_emit_light_model(struct gl_context *ctx, int emit)
struct nouveau_grobj *celsius = context_eng3d(ctx);
struct gl_lightmodel *m = &ctx->Light.Model;
- BEGIN_RING(chan, celsius, NV10TCL_SEPARATE_SPECULAR_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_SEPARATE_SPECULAR_ENABLE, 1);
OUT_RING(chan, m->ColorControl == GL_SEPARATE_SPECULAR_COLOR ? 1 : 0);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_MODEL, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_MODEL, 1);
OUT_RING(chan, ((m->LocalViewer ?
- NV10TCL_LIGHT_MODEL_LOCAL_VIEWER : 0) |
+ NV10_3D_LIGHT_MODEL_LOCAL_VIEWER : 0) |
(NEED_SECONDARY_COLOR(ctx) ?
- NV10TCL_LIGHT_MODEL_SEPARATE_SPECULAR : 0) |
+ NV10_3D_LIGHT_MODEL_SEPARATE_SPECULAR : 0) |
(!ctx->Light.Enabled && ctx->Fog.ColorSumEnabled ?
- NV10TCL_LIGHT_MODEL_VERTEX_SPECULAR : 0)));
+ NV10_3D_LIGHT_MODEL_VERTEX_SPECULAR : 0)));
}
static float
@@ -281,20 +281,20 @@ nv10_emit_light_source(struct gl_context *ctx, int emit)
struct gl_light *l = &ctx->Light.Light[i];
if (l->_Flags & LIGHT_POSITIONAL) {
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_POSITION_X(i), 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_POSITION_X(i), 3);
OUT_RINGp(chan, l->_Position, 3);
BEGIN_RING(chan, celsius,
- NV10TCL_LIGHT_ATTENUATION_CONSTANT(i), 3);
+ NV10_3D_LIGHT_ATTENUATION_CONSTANT(i), 3);
OUT_RINGf(chan, l->ConstantAttenuation);
OUT_RINGf(chan, l->LinearAttenuation);
OUT_RINGf(chan, l->QuadraticAttenuation);
} else {
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_DIRECTION_X(i), 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_DIRECTION_X(i), 3);
OUT_RINGp(chan, l->_VP_inf_norm, 3);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_HALF_VECTOR_X(i), 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_HALF_VECTOR_X(i), 3);
OUT_RINGp(chan, l->_h_inf_norm, 3);
}
@@ -303,7 +303,7 @@ nv10_emit_light_source(struct gl_context *ctx, int emit)
nv10_get_spot_coeff(l, k);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_SPOT_CUTOFF_A(i), 7);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_SPOT_CUTOFF(i, 0), 7);
OUT_RINGp(chan, k, 7);
}
}
@@ -335,11 +335,11 @@ nv10_emit_material_ambient(struct gl_context *ctx, int emit)
ZERO_3V(c_factor);
}
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_MODEL_AMBIENT_R, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_MODEL_AMBIENT_R, 3);
OUT_RINGp(chan, c_scene, 3);
if (ctx->Light.ColorMaterialEnabled) {
- BEGIN_RING(chan, celsius, NV10TCL_MATERIAL_FACTOR_R, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_MATERIAL_FACTOR_R, 3);
OUT_RINGp(chan, c_factor, 3);
}
@@ -349,7 +349,7 @@ nv10_emit_material_ambient(struct gl_context *ctx, int emit)
l->Ambient :
l->_MatAmbient[0]);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_AMBIENT_R(i), 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_AMBIENT_R(i), 3);
OUT_RINGp(chan, c_light, 3);
}
}
@@ -362,7 +362,7 @@ nv10_emit_material_diffuse(struct gl_context *ctx, int emit)
GLfloat (*mat)[4] = ctx->Light.Material.Attrib;
struct gl_light *l;
- BEGIN_RING(chan, celsius, NV10TCL_MATERIAL_FACTOR_A, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_MATERIAL_FACTOR_A, 1);
OUT_RINGf(chan, mat[MAT_ATTRIB_FRONT_DIFFUSE][3]);
foreach(l, &ctx->Light.EnabledList) {
@@ -371,7 +371,7 @@ nv10_emit_material_diffuse(struct gl_context *ctx, int emit)
l->Diffuse :
l->_MatDiffuse[0]);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_DIFFUSE_R(i), 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_DIFFUSE_R(i), 3);
OUT_RINGp(chan, c_light, 3);
}
}
@@ -389,7 +389,7 @@ nv10_emit_material_specular(struct gl_context *ctx, int emit)
l->Specular :
l->_MatSpecular[0]);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_SPECULAR_R(i), 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_SPECULAR_R(i), 3);
OUT_RINGp(chan, c_light, 3);
}
}
@@ -430,7 +430,7 @@ nv10_emit_material_shininess(struct gl_context *ctx, int emit)
CLAMP(mat[MAT_ATTRIB_FRONT_SHININESS][0], 0, 1024),
k);
- BEGIN_RING(chan, celsius, NV10TCL_MATERIAL_SHININESS(0), 6);
+ BEGIN_RING(chan, celsius, NV10_3D_MATERIAL_SHININESS(0), 6);
OUT_RINGp(chan, k, 6);
}
@@ -447,7 +447,7 @@ nv10_emit_modelview(struct gl_context *ctx, int emit)
if (ctx->Light._NeedEyeCoords || ctx->Fog.Enabled ||
(ctx->Texture._GenFlags & TEXGEN_NEED_EYE_COORD)) {
- BEGIN_RING(chan, celsius, NV10TCL_MODELVIEW0_MATRIX(0), 16);
+ BEGIN_RING(chan, celsius, NV10_3D_MODELVIEW_MATRIX(0, 0), 16);
OUT_RINGm(chan, m->m);
}
@@ -456,7 +456,7 @@ nv10_emit_modelview(struct gl_context *ctx, int emit)
int i, j;
BEGIN_RING(chan, celsius,
- NV10TCL_INVERSE_MODELVIEW0_MATRIX(0), 12);
+ NV10_3D_INVERSE_MODELVIEW_MATRIX(0, 0), 12);
for (i = 0; i < 3; i++)
for (j = 0; j < 4; j++)
OUT_RINGf(chan, m->inv[4*i + j]);
@@ -485,7 +485,7 @@ nv10_emit_projection(struct gl_context *ctx, int emit)
if (nctx->fallback == HWTNL)
_math_matrix_mul_matrix(&m, &m, &ctx->_ModelProjectMatrix);
- BEGIN_RING(chan, celsius, NV10TCL_PROJECTION_MATRIX(0), 16);
+ BEGIN_RING(chan, celsius, NV10_3D_PROJECTION_MATRIX(0), 16);
OUT_RINGm(chan, m.m);
_math_matrix_dtr(&m);