From 1feee7b1b39e54c279ffdc3c27f3911c04658430 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 10 Jan 2011 14:04:02 -0800 Subject: i965: Rename more #defines to 3DSTATE rather than CMD or CMD_3D. Again, this makes it match the documentation. --- src/mesa/drivers/dri/i965/brw_cc.c | 2 +- src/mesa/drivers/dri/i965/brw_defines.h | 24 ++++++++++++------------ src/mesa/drivers/dri/i965/brw_misc_state.c | 18 +++++++++--------- 3 files changed, 22 insertions(+), 22 deletions(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c index d3a1233aac0..d286c9dbdc7 100644 --- a/src/mesa/drivers/dri/i965/brw_cc.c +++ b/src/mesa/drivers/dri/i965/brw_cc.c @@ -239,7 +239,7 @@ static void upload_blend_constant_color(struct brw_context *brw) struct brw_blend_constant_color bcc; memset(&bcc, 0, sizeof(bcc)); - bcc.header.opcode = CMD_BLEND_CONSTANT_COLOR; + bcc.header.opcode = _3DSTATE_BLEND_CONSTANT_COLOR; bcc.header.length = sizeof(bcc)/4-2; bcc.blend_constant_color[0] = ctx->Color.BlendColor[0]; bcc.blend_constant_color[1] = ctx->Color.BlendColor[1]; diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index 315a7bf1478..fbf4fa2bff4 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -1095,17 +1095,17 @@ #define _3DSTATE_SAMPLE_MASK 0x7818 /* GEN6+ */ -#define CMD_DRAW_RECT 0x7900 -#define CMD_BLEND_CONSTANT_COLOR 0x7901 -#define CMD_CHROMA_KEY 0x7904 -#define CMD_DEPTH_BUFFER 0x7905 -#define CMD_POLY_STIPPLE_OFFSET 0x7906 -#define CMD_POLY_STIPPLE_PATTERN 0x7907 -#define CMD_LINE_STIPPLE_PATTERN 0x7908 -#define CMD_GLOBAL_DEPTH_OFFSET_CLAMP 0x7909 -#define CMD_AA_LINE_PARAMETERS 0x790a - -#define CMD_GS_SVB_INDEX 0x790b /* CTG+ */ +#define _3DSTATE_DRAWING_RECTANGLE 0x7900 +#define _3DSTATE_BLEND_CONSTANT_COLOR 0x7901 +#define _3DSTATE_CHROMA_KEY 0x7904 +#define _3DSTATE_DEPTH_BUFFER 0x7905 +#define _3DSTATE_POLY_STIPPLE_OFFSET 0x7906 +#define _3DSTATE_POLY_STIPPLE_PATTERN 0x7907 +#define _3DSTATE_LINE_STIPPLE_PATTERN 0x7908 +#define _3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP 0x7909 +#define _3DSTATE_AA_LINE_PARAMETERS 0x790a /* G45+ */ + +#define _3DSTATE_GS_SVB_INDEX 0x790b /* CTG+ */ /* DW1 */ # define SVB_INDEX_SHIFT 29 # define SVB_LOAD_INTERNAL_VERTEX_COUNT (1 << 0) /* SNB+ */ @@ -1120,7 +1120,7 @@ # define MS_NUMSAMPLES_4 (2 << 1) # define MS_NUMSAMPLES_8 (3 << 1) -#define CMD_3D_CLEAR_PARAMS 0x7910 /* ILK+ */ +#define _3DSTATE_CLEAR_PARAMS 0x7910 /* ILK+ */ # define DEPTH_CLEAR_VALID (1 << 15) /* DW1: depth clear value */ diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c index c49ebe64a60..79afe19deba 100644 --- a/src/mesa/drivers/dri/i965/brw_misc_state.c +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c @@ -214,7 +214,7 @@ static void emit_depthbuffer(struct brw_context *brw) if (region == NULL) { BEGIN_BATCH(len); - OUT_BATCH(CMD_DEPTH_BUFFER << 16 | (len - 2)); + OUT_BATCH(_3DSTATE_DEPTH_BUFFER << 16 | (len - 2)); OUT_BATCH((BRW_DEPTHFORMAT_D32_FLOAT << 18) | (BRW_SURFACE_NULL << 29)); OUT_BATCH(0); @@ -251,7 +251,7 @@ static void emit_depthbuffer(struct brw_context *brw) assert(region->tiling != I915_TILING_NONE); BEGIN_BATCH(len); - OUT_BATCH(CMD_DEPTH_BUFFER << 16 | (len - 2)); + OUT_BATCH(_3DSTATE_DEPTH_BUFFER << 16 | (len - 2)); OUT_BATCH(((region->pitch * region->cpp) - 1) | (format << 18) | (BRW_TILEWALK_YMAJOR << 26) | @@ -277,7 +277,7 @@ static void emit_depthbuffer(struct brw_context *brw) /* Initialize it for safety. */ if (intel->gen >= 6) { BEGIN_BATCH(2); - OUT_BATCH(CMD_3D_CLEAR_PARAMS << 16 | (2 - 2)); + OUT_BATCH(_3DSTATE_CLEAR_PARAMS << 16 | (2 - 2)); OUT_BATCH(0); ADVANCE_BATCH(); } @@ -309,7 +309,7 @@ static void upload_polygon_stipple(struct brw_context *brw) return; memset(&bps, 0, sizeof(bps)); - bps.header.opcode = CMD_POLY_STIPPLE_PATTERN; + bps.header.opcode = _3DSTATE_POLY_STIPPLE_PATTERN; bps.header.length = sizeof(bps)/4-2; /* Polygon stipple is provided in OpenGL order, i.e. bottom @@ -354,7 +354,7 @@ static void upload_polygon_stipple_offset(struct brw_context *brw) return; memset(&bpso, 0, sizeof(bpso)); - bpso.header.opcode = CMD_POLY_STIPPLE_OFFSET; + bpso.header.opcode = _3DSTATE_POLY_STIPPLE_OFFSET; bpso.header.length = sizeof(bpso)/4-2; /* If we're drawing to a system window (ctx->DrawBuffer->Name == 0), @@ -401,7 +401,7 @@ static void upload_aa_line_parameters(struct brw_context *brw) /* use legacy aa line coverage computation */ memset(&balp, 0, sizeof(balp)); - balp.header.opcode = CMD_AA_LINE_PARAMETERS; + balp.header.opcode = _3DSTATE_AA_LINE_PARAMETERS; balp.header.length = sizeof(balp) / 4 - 2; BRW_CACHED_BATCH_STRUCT(brw, &balp); @@ -431,7 +431,7 @@ static void upload_line_stipple(struct brw_context *brw) return; memset(&bls, 0, sizeof(bls)); - bls.header.opcode = CMD_LINE_STIPPLE_PATTERN; + bls.header.opcode = _3DSTATE_LINE_STIPPLE_PATTERN; bls.header.length = sizeof(bls)/4 - 2; bls.bits0.pattern = ctx->Line.StipplePattern; @@ -481,7 +481,7 @@ static void upload_invarient_state( struct brw_context *brw ) /* Disable depth offset clamping. */ - gdo.header.opcode = CMD_GLOBAL_DEPTH_OFFSET_CLAMP; + gdo.header.opcode = _3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP; gdo.header.length = sizeof(gdo)/4 - 2; gdo.depth_offset_clamp = 0.0; @@ -505,7 +505,7 @@ static void upload_invarient_state( struct brw_context *brw ) for (i = 0; i < 4; i++) { BEGIN_BATCH(4); - OUT_BATCH(CMD_GS_SVB_INDEX << 16 | (4 - 2)); + OUT_BATCH(_3DSTATE_GS_SVB_INDEX << 16 | (4 - 2)); OUT_BATCH(i << SVB_INDEX_SHIFT); OUT_BATCH(0); OUT_BATCH(0xffffffff); -- cgit v1.2.3