i965: Fix up some Sandybridge define checks for the structure rebase.
authorEric Anholt <eric@anholt.net>
Mon, 21 Dec 2009 22:28:18 +0000 (14:28 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 25 Feb 2010 18:53:08 +0000 (10:53 -0800)
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/drivers/dri/intel/intel_context.c

index e6bfc567af89fa50a9cf2d1e208478057d32044f..f0a4e8ad65d079e7c8411dc3f4bb2cf63b12bf4e 100644 (file)
@@ -536,7 +536,7 @@ static void brw_emit_vertices(struct brw_context *brw)
       struct brw_vertex_element *input = brw->vb.enabled[i];
       uint32_t dw0;
 
-      if (IS_GEN6(intel->intelScreen->deviceID)) {
+      if (intel->gen >= 6) {
         dw0 = GEN6_VB0_ACCESS_VERTEXDATA |
            (i << GEN6_VB0_INDEX_SHIFT);
       } else {
@@ -549,7 +549,7 @@ static void brw_emit_vertices(struct brw_context *brw)
       OUT_RELOC(input->bo,
                I915_GEM_DOMAIN_VERTEX, 0,
                input->offset);
-      if (intel->is_ironlake) {
+      if (intel->is_ironlake || intel->gen >= 6) {
         OUT_RELOC(input->bo,
                   I915_GEM_DOMAIN_VERTEX, 0,
                   input->bo->size - 1);
@@ -592,7 +592,7 @@ static void brw_emit_vertices(struct brw_context *brw)
                   (0 << BRW_VE0_SRC_OFFSET_SHIFT));
       }
 
-      if (intel->is_ironlake)
+      if (intel->is_ironlake || intel->gen >= 6)
           OUT_BATCH((comp0 << BRW_VE1_COMPONENT_0_SHIFT) |
                     (comp1 << BRW_VE1_COMPONENT_1_SHIFT) |
                     (comp2 << BRW_VE1_COMPONENT_2_SHIFT) |
index 8af7a23385137a20705fbb881ca48e5085ac1fc0..767ad8c9d2c282be02549e99f63d48336fd19d7e 100644 (file)
@@ -612,6 +612,8 @@ intelInitContext(struct intel_context *intel,
 
    if (IS_GEN6(intel->intelScreen->deviceID)) {
       intel->gen = 6;
+      intel->needs_ff_sync = GL_TRUE;
+      intel->has_luminance_srgb = GL_TRUE;
    } else if (IS_965(intel->intelScreen->deviceID)) {
       intel->gen = 4;
    } else if (IS_9XX(intel->intelScreen->deviceID)) {