i965: Convert 3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP to OUT_BATCH style.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 30 Jun 2011 06:50:05 +0000 (23:50 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 7 Jul 2011 20:31:41 +0000 (13:31 -0700)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_misc_state.c
src/mesa/drivers/dri/i965/brw_structs.h

index 033c77cd32150c9a461fe3ff01613801e33854eb..6e2620ae9f92769cb92ab1ece2c557d9d4eadf11 100644 (file)
@@ -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) {
index 7b9cdba4cbf82c6951134a021ec5233ecd3202a0..1b9644f4776f378611249827505c82ffdd389dfd 100644 (file)
@@ -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 {