i965: fix point size setting in header on sandybridge
authorZhenyu Wang <zhenyuw@linux.intel.com>
Fri, 17 Sep 2010 05:08:22 +0000 (13:08 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 28 Sep 2010 07:58:20 +0000 (15:58 +0800)
src/mesa/drivers/dri/i965/brw_vs_emit.c

index ed2625e16f6ef6d84fa0be1b36017fa374684f81..162ddc93c8beaef2ca18f4966371830d36b0fa85 100644 (file)
@@ -1392,8 +1392,11 @@ static void emit_vertex_write( struct brw_vs_compile *c)
 
       if (c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_PSIZ)) {
         struct brw_reg psiz = c->regs[PROGRAM_OUTPUT][VERT_RESULT_PSIZ];
-        brw_MUL(p, brw_writemask(header1, WRITEMASK_W), brw_swizzle1(psiz, 0), brw_imm_f(1<<11));
-        brw_AND(p, brw_writemask(header1, WRITEMASK_W), header1, brw_imm_ud(0x7ff<<8));
+        if (intel->gen < 6) {
+            brw_MUL(p, brw_writemask(header1, WRITEMASK_W), brw_swizzle1(psiz, 0), brw_imm_f(1<<11));
+            brw_AND(p, brw_writemask(header1, WRITEMASK_W), header1, brw_imm_ud(0x7ff<<8));
+        } else
+            brw_MOV(p, brw_writemask(header1, WRITEMASK_W), brw_swizzle1(psiz, 0));
       }
 
       for (i = 0; i < c->key.nr_userclip; i++) {