summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2011-06-29 23:50:05 -0700
committerKenneth Graunke <[email protected]>2011-07-07 13:31:41 -0700
commita68c5e6b71ac9abf70eb443637d4e79ffba66595 (patch)
tree5cc907eb7c5ec237ab901121107a624dc5b3b2ec /src
parente01e30b916dcbe01471a573ecaddb509cb9f0969 (diff)
i965: Convert 3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP to OUT_BATCH style.
Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_misc_state.c15
-rw-r--r--src/mesa/drivers/dri/i965/brw_structs.h9
2 files changed, 5 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 033c77cd321..6e2620ae9f9 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -621,16 +621,11 @@ static void upload_invarient_state( struct brw_context *brw )
}
if (intel->gen < 6) {
- struct brw_global_depth_offset_clamp gdo;
- memset(&gdo, 0, sizeof(gdo));
-
- /* Disable depth offset clamping.
- */
- gdo.header.opcode = _3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP;
- gdo.header.length = sizeof(gdo)/4 - 2;
- gdo.depth_offset_clamp = 0.0;
-
- BRW_BATCH_STRUCT(brw, &gdo);
+ /* Disable depth offset clamping. */
+ BEGIN_BATCH(2);
+ OUT_BATCH(_3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP << 16 | (2 - 2));
+ OUT_BATCH_F(0.0);
+ ADVANCE_BATCH();
}
if (intel->gen >= 6) {
diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h
index 7b9cdba4cbf..1b9644f4776 100644
--- a/src/mesa/drivers/dri/i965/brw_structs.h
+++ b/src/mesa/drivers/dri/i965/brw_structs.h
@@ -225,15 +225,6 @@ struct brw_drawrect
GLuint yorg:16;
};
-
-
-
-struct brw_global_depth_offset_clamp
-{
- struct header header;
- GLfloat depth_offset_clamp;
-};
-
struct brw_indexbuffer
{
union {