i965: Use intel->gen >= 6 instead of IS_GEN6.
authorEric Anholt <eric@anholt.net>
Sun, 22 Aug 2010 06:47:06 +0000 (23:47 -0700)
committerEric Anholt <eric@anholt.net>
Sun, 22 Aug 2010 07:52:18 +0000 (00:52 -0700)
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/drivers/dri/i965/brw_misc_state.c
src/mesa/drivers/dri/i965/brw_state_upload.c

index f07aab86e9048120f92aa156a78c345a98579c96..249e874ab1a7476be5064789fc46a7a1dbd5a294 100644 (file)
@@ -476,7 +476,7 @@ static void brw_emit_vertices(struct brw_context *brw)
    if (brw->vb.nr_enabled == 0) {
       BEGIN_BATCH(3);
       OUT_BATCH((CMD_VERTEX_ELEMENT << 16) | 1);
-      if (IS_GEN6(intel->intelScreen->deviceID)) {
+      if (intel->gen >= 6) {
         OUT_BATCH((0 << GEN6_VE0_INDEX_SHIFT) |
                   GEN6_VE0_VALID |
                   (BRW_SURFACEFORMAT_R32G32B32A32_FLOAT << BRW_VE0_FORMAT_SHIFT) |
@@ -553,7 +553,7 @@ static void brw_emit_vertices(struct brw_context *brw)
         break;
       }
 
-      if (IS_GEN6(intel->intelScreen->deviceID)) {
+      if (intel->gen >= 6) {
         OUT_BATCH((i << GEN6_VE0_INDEX_SHIFT) |
                   GEN6_VE0_VALID |
                   (format << BRW_VE0_FORMAT_SHIFT) |
index 572175f463e16fdf8408027570f13c86135828c1..565a9e3ee18bc8999725a386e1937aeb49c955c5 100644 (file)
@@ -281,7 +281,7 @@ static void emit_depthbuffer(struct brw_context *brw)
       }
 
       assert(region->tiling != I915_TILING_X);
-      if (IS_GEN6(intel->intelScreen->deviceID))
+      if (intel->gen >= 6)
         assert(region->tiling != I915_TILING_NONE);
 
       BEGIN_BATCH(len);
index f92a19c2aa0f7c28905d562d6661244ceb794a4f..97266124fe73a8fff624b275d43c449d26b6933b 100644 (file)
@@ -351,7 +351,7 @@ void brw_validate_state( struct brw_context *brw )
 
    brw_add_validated_bo(brw, intel->batch->buf);
 
-   if (IS_GEN6(intel->intelScreen->deviceID)) {
+   if (intel->gen >= 6) {
       atoms = gen6_atoms;
       num_atoms = ARRAY_SIZE(gen6_atoms);
    } else {
@@ -425,7 +425,7 @@ void brw_upload_state(struct brw_context *brw)
    const struct brw_tracked_state **atoms;
    int num_atoms;
 
-   if (IS_GEN6(intel->intelScreen->deviceID)) {
+   if (intel->gen >= 6) {
       atoms = gen6_atoms;
       num_atoms = ARRAY_SIZE(gen6_atoms);
    } else {