summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-02-28 19:25:57 +0100
committerChristoph Bumiller <[email protected]>2012-04-14 06:14:21 +0200
commit7a40ae4a31f3ab526706fdfda7631d54f094512a (patch)
treef1c7ea2326ebd5bc2719390fb805a3c287560399
parentce713cd520792707e9097ef9e843ef7ab57b0eab (diff)
nvc0: prefix all macro methods with MACRO
Some of them have non-macro counterparts.
-rw-r--r--src/gallium/drivers/nvc0/nvc0_3d.xml.h26
-rw-r--r--src/gallium/drivers/nvc0/nvc0_screen.c16
-rw-r--r--src/gallium/drivers/nvc0/nvc0_shader_state.c8
-rw-r--r--src/gallium/drivers/nvc0/nvc0_state.c11
-rw-r--r--src/gallium/drivers/nvc0/nvc0_surface.c8
-rw-r--r--src/gallium/drivers/nvc0/nvc0_vbo.c2
6 files changed, 36 insertions, 35 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_3d.xml.h b/src/gallium/drivers/nvc0/nvc0_3d.xml.h
index 61ca1b87262..71fa1516e16 100644
--- a/src/gallium/drivers/nvc0/nvc0_3d.xml.h
+++ b/src/gallium/drivers/nvc0/nvc0_3d.xml.h
@@ -1307,25 +1307,25 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NVC0_3D_TFB_VARYING_LOCS__ESIZE 0x00000004
#define NVC0_3D_TFB_VARYING_LOCS__LEN 0x00000020
-#define NVC0_3D_MACRO_VERTEX_ARRAY_PER_INSTANCE 0x00003800
+#define NVC0_3D_MACRO_VERTEX_ARRAY_PER_INSTANCE 0x00003800
-#define NVC0_3D_VERTEX_ARRAY_SELECT 0x00003820
+#define NVC0_3D_MACRO_VERTEX_ARRAY_SELECT 0x00003808
-#define NVC0_3D_BLEND_ENABLES 0x00003858
+#define NVC0_3D_MACRO_BLEND_ENABLES 0x00003810
-#define NVC0_3D_POLYGON_MODE_FRONT 0x00003868
-#define NVC0_3D_POLYGON_MODE_FRONT_POINT 0x00001b00
-#define NVC0_3D_POLYGON_MODE_FRONT_LINE 0x00001b01
-#define NVC0_3D_POLYGON_MODE_FRONT_FILL 0x00001b02
+#define NVC0_3D_MACRO_POLYGON_MODE_FRONT 0x00003818
+#define NVC0_3D_MACRO_POLYGON_MODE_FRONT_POINT 0x00001b00
+#define NVC0_3D_MACRO_POLYGON_MODE_FRONT_LINE 0x00001b01
+#define NVC0_3D_MACRO_POLYGON_MODE_FRONT_FILL 0x00001b02
-#define NVC0_3D_POLYGON_MODE_BACK 0x00003870
-#define NVC0_3D_POLYGON_MODE_BACK_POINT 0x00001b00
-#define NVC0_3D_POLYGON_MODE_BACK_LINE 0x00001b01
-#define NVC0_3D_POLYGON_MODE_BACK_FILL 0x00001b02
+#define NVC0_3D_MACRO_POLYGON_MODE_BACK 0x00003820
+#define NVC0_3D_MACRO_POLYGON_MODE_BACK_POINT 0x00001b00
+#define NVC0_3D_MACRO_POLYGON_MODE_BACK_LINE 0x00001b01
+#define NVC0_3D_MACRO_POLYGON_MODE_BACK_FILL 0x00001b02
-#define NVC0_3D_GP_SELECT 0x00003878
+#define NVC0_3D_MACRO_GP_SELECT 0x00003828
-#define NVC0_3D_TEP_SELECT 0x00003880
+#define NVC0_3D_MACRO_TEP_SELECT 0x00003830
#endif /* NVC0_3D_XML */
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
index 949443d1603..bad06c3f009 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nvc0/nvc0_screen.c
@@ -624,22 +624,22 @@ nvc0_screen_create(struct nouveau_device *dev)
i = 0;
MK_MACRO(NVC0_3D_MACRO_VERTEX_ARRAY_PER_INSTANCE, nvc0_9097_per_instance_bf);
- MK_MACRO(NVC0_3D_BLEND_ENABLES, nvc0_9097_blend_enables);
- MK_MACRO(NVC0_3D_VERTEX_ARRAY_SELECT, nvc0_9097_vertex_array_select);
- MK_MACRO(NVC0_3D_TEP_SELECT, nvc0_9097_tep_select);
- MK_MACRO(NVC0_3D_GP_SELECT, nvc0_9097_gp_select);
- MK_MACRO(NVC0_3D_POLYGON_MODE_FRONT, nvc0_9097_poly_mode_front);
- MK_MACRO(NVC0_3D_POLYGON_MODE_BACK, nvc0_9097_poly_mode_back);
+ MK_MACRO(NVC0_3D_MACRO_BLEND_ENABLES, nvc0_9097_blend_enables);
+ MK_MACRO(NVC0_3D_MACRO_VERTEX_ARRAY_SELECT, nvc0_9097_vertex_array_select);
+ MK_MACRO(NVC0_3D_MACRO_TEP_SELECT, nvc0_9097_tep_select);
+ MK_MACRO(NVC0_3D_MACRO_GP_SELECT, nvc0_9097_gp_select);
+ MK_MACRO(NVC0_3D_MACRO_POLYGON_MODE_FRONT, nvc0_9097_poly_mode_front);
+ MK_MACRO(NVC0_3D_MACRO_POLYGON_MODE_BACK, nvc0_9097_poly_mode_back);
BEGIN_NVC0(push, NVC0_3D(RASTERIZE_ENABLE), 1);
PUSH_DATA (push, 1);
BEGIN_NVC0(push, NVC0_3D(RT_SEPARATE_FRAG_DATA), 1);
PUSH_DATA (push, 1);
- BEGIN_NVC0(push, NVC0_3D(GP_SELECT), 1);
+ BEGIN_NVC0(push, NVC0_3D(MACRO_GP_SELECT), 1);
PUSH_DATA (push, 0x40);
BEGIN_NVC0(push, NVC0_3D(LAYER), 1);
PUSH_DATA (push, 0);
- BEGIN_NVC0(push, NVC0_3D(TEP_SELECT), 1);
+ BEGIN_NVC0(push, NVC0_3D(MACRO_TEP_SELECT), 1);
PUSH_DATA (push, 0x30);
BEGIN_NVC0(push, NVC0_3D(PATCH_VERTICES), 1);
PUSH_DATA (push, 3);
diff --git a/src/gallium/drivers/nvc0/nvc0_shader_state.c b/src/gallium/drivers/nvc0/nvc0_shader_state.c
index 6cbaaf9d1d8..54dfd8d1a1a 100644
--- a/src/gallium/drivers/nvc0/nvc0_shader_state.c
+++ b/src/gallium/drivers/nvc0/nvc0_shader_state.c
@@ -165,14 +165,14 @@ nvc0_tevlprog_validate(struct nvc0_context *nvc0)
BEGIN_NVC0(push, NVC0_3D(TESS_MODE), 1);
PUSH_DATA (push, tp->tp.tess_mode);
}
- BEGIN_NVC0(push, NVC0_3D(TEP_SELECT), 1);
+ BEGIN_NVC0(push, NVC0_3D(MACRO_TEP_SELECT), 1);
PUSH_DATA (push, 0x31);
BEGIN_NVC0(push, NVC0_3D(SP_START_ID(3)), 1);
PUSH_DATA (push, tp->code_base);
BEGIN_NVC0(push, NVC0_3D(SP_GPR_ALLOC(3)), 1);
PUSH_DATA (push, tp->max_gpr);
} else {
- BEGIN_NVC0(push, NVC0_3D(TEP_SELECT), 1);
+ BEGIN_NVC0(push, NVC0_3D(MACRO_TEP_SELECT), 1);
PUSH_DATA (push, 0x30);
}
nvc0_program_update_context_state(nvc0, tp, 2);
@@ -191,7 +191,7 @@ nvc0_gmtyprog_validate(struct nvc0_context *nvc0)
if (gp && gp->code_size) {
const boolean gp_selects_layer = gp->hdr[13] & (1 << 9);
- BEGIN_NVC0(push, NVC0_3D(GP_SELECT), 1);
+ BEGIN_NVC0(push, NVC0_3D(MACRO_GP_SELECT), 1);
PUSH_DATA (push, 0x41);
BEGIN_NVC0(push, NVC0_3D(SP_START_ID(4)), 1);
PUSH_DATA (push, gp->code_base);
@@ -201,7 +201,7 @@ nvc0_gmtyprog_validate(struct nvc0_context *nvc0)
PUSH_DATA (push, gp_selects_layer ? NVC0_3D_LAYER_USE_GP : 0);
} else {
IMMED_NVC0(push, NVC0_3D(LAYER), 0);
- BEGIN_NVC0(push, NVC0_3D(GP_SELECT), 1);
+ BEGIN_NVC0(push, NVC0_3D(MACRO_GP_SELECT), 1);
PUSH_DATA (push, 0x40);
}
nvc0_program_update_context_state(nvc0, gp, 3);
diff --git a/src/gallium/drivers/nvc0/nvc0_state.c b/src/gallium/drivers/nvc0/nvc0_state.c
index eb71e6b9853..a2be53a433d 100644
--- a/src/gallium/drivers/nvc0/nvc0_state.c
+++ b/src/gallium/drivers/nvc0/nvc0_state.c
@@ -102,10 +102,11 @@ nvc0_blend_state_create(struct pipe_context *pipe,
SB_DATA (so, 1);
SB_DATA (so, nvgl_logicop_func(cso->logicop_func));
- SB_IMMED_3D(so, BLEND_ENABLES, 0);
+ SB_IMMED_3D(so, MACRO_BLEND_ENABLES, 0);
} else
if (!cso->independent_blend_enable) {
- SB_IMMED_3D(so, BLEND_ENABLES, cso->rt[0].blend_enable ? 0xff : 0);
+ SB_IMMED_3D(so,
+ MACRO_BLEND_ENABLES, cso->rt[0].blend_enable ? 0xff : 0);
if (cso->rt[0].blend_enable) {
SB_BEGIN_3D(so, BLEND_EQUATION_RGB, 5);
@@ -137,7 +138,7 @@ nvc0_blend_state_create(struct pipe_context *pipe,
SB_DATA (so, nvc0_blend_fac(cso->rt[i].alpha_src_factor));
SB_DATA (so, nvc0_blend_fac(cso->rt[i].alpha_dst_factor));
}
- SB_IMMED_3D(so, BLEND_ENABLES, en);
+ SB_IMMED_3D(so, MACRO_BLEND_ENABLES, en);
SB_IMMED_3D(so, COLOR_MASK_COMMON, 0);
SB_BEGIN_3D(so, COLOR_MASK(0), 8);
@@ -232,9 +233,9 @@ nvc0_rasterizer_state_create(struct pipe_context *pipe,
SB_IMMED_3D(so, POINT_SPRITE_ENABLE, cso->point_quad_rasterization);
SB_IMMED_3D(so, POINT_SMOOTH_ENABLE, cso->point_smooth);
- SB_BEGIN_3D(so, POLYGON_MODE_FRONT, 1);
+ SB_BEGIN_3D(so, MACRO_POLYGON_MODE_FRONT, 1);
SB_DATA (so, nvgl_polygon_mode(cso->fill_front));
- SB_BEGIN_3D(so, POLYGON_MODE_BACK, 1);
+ SB_BEGIN_3D(so, MACRO_POLYGON_MODE_BACK, 1);
SB_DATA (so, nvgl_polygon_mode(cso->fill_back));
SB_IMMED_3D(so, POLYGON_SMOOTH_ENABLE, cso->poly_smooth);
diff --git a/src/gallium/drivers/nvc0/nvc0_surface.c b/src/gallium/drivers/nvc0/nvc0_surface.c
index d1a233fbcf6..3378b513936 100644
--- a/src/gallium/drivers/nvc0/nvc0_surface.c
+++ b/src/gallium/drivers/nvc0/nvc0_surface.c
@@ -725,10 +725,10 @@ nvc0_blitctx_prepare_state(struct nvc0_blitctx *blit)
PUSH_DATA (push, 0xffff);
PUSH_DATA (push, 0xffff);
PUSH_DATA (push, 0xffff);
- BEGIN_NVC0(push, NVC0_3D(POLYGON_MODE_FRONT), 1);
- PUSH_DATA (push, NVC0_3D_POLYGON_MODE_FRONT_FILL);
- BEGIN_NVC0(push, NVC0_3D(POLYGON_MODE_BACK), 1);
- PUSH_DATA (push, NVC0_3D_POLYGON_MODE_BACK_FILL);
+ BEGIN_NVC0(push, NVC0_3D(MACRO_POLYGON_MODE_FRONT), 1);
+ PUSH_DATA (push, NVC0_3D_MACRO_POLYGON_MODE_FRONT_FILL);
+ BEGIN_NVC0(push, NVC0_3D(MACRO_POLYGON_MODE_BACK), 1);
+ PUSH_DATA (push, NVC0_3D_MACRO_POLYGON_MODE_BACK_FILL);
IMMED_NVC0(push, NVC0_3D(POLYGON_SMOOTH_ENABLE), 0);
IMMED_NVC0(push, NVC0_3D(POLYGON_OFFSET_FILL_ENABLE), 0);
IMMED_NVC0(push, NVC0_3D(POLYGON_STIPPLE_ENABLE), 0);
diff --git a/src/gallium/drivers/nvc0/nvc0_vbo.c b/src/gallium/drivers/nvc0/nvc0_vbo.c
index a8aa60f4fe5..1d4d07d93c2 100644
--- a/src/gallium/drivers/nvc0/nvc0_vbo.c
+++ b/src/gallium/drivers/nvc0/nvc0_vbo.c
@@ -267,7 +267,7 @@ nvc0_update_user_vbufs(struct nvc0_context *nvc0)
}
offset = vb->buffer_offset + ve->src_offset;
- BEGIN_1IC0(push, NVC0_3D(VERTEX_ARRAY_SELECT), 5);
+ BEGIN_1IC0(push, NVC0_3D(MACRO_VERTEX_ARRAY_SELECT), 5);
PUSH_DATA (push, i);
PUSH_DATAh(push, buf->address + base + size - 1);
PUSH_DATA (push, buf->address + base + size - 1);