r600g: don't emit forbidden register on old kernel
authorJerome Glisse <jglisse@redhat.com>
Mon, 23 Jul 2012 15:26:24 +0000 (11:26 -0400)
committerJerome Glisse <jglisse@redhat.com>
Mon, 23 Jul 2012 15:28:25 +0000 (11:28 -0400)
Fix https://bugs.freedesktop.org/show_bug.cgi?id=52313

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c

index 9313cb41a8a89dc388857ab1c46d0108b1deac58..61d893bacee06a66c3749bcd9c9f2d0c8a43d705 100644 (file)
@@ -2107,7 +2107,9 @@ static void cayman_init_atom_start_cs(struct r600_context *rctx)
 
        r600_store_context_reg(cb, R_028354_SX_SURFACE_SYNC, S_028354_SURFACE_SYNC_MASK(0xf));
        r600_store_context_reg(cb, R_028800_DB_DEPTH_CONTROL, 0);
-       r600_store_context_reg(cb, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 0);
+       if (rctx->screen->has_streamout) {
+               r600_store_context_reg(cb, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 0);
+       }
 
        eg_store_loop_const(cb, R_03A200_SQ_LOOP_CONST_0, 0x01000FFF);
        eg_store_loop_const(cb, R_03A200_SQ_LOOP_CONST_0 + (32 * 4), 0x01000FFF);
index 50a7bec7936a2bfeb508c7010579aba6868d240a..82f5ffb16f3a026c0ae08e50085183a8fead1ec0 100644 (file)
@@ -2258,7 +2258,9 @@ void r600_init_atom_start_cs(struct r600_context *rctx)
        if (rctx->chip_class == R700 && rctx->screen->has_streamout)
                r600_store_context_reg(cb, R_028354_SX_SURFACE_SYNC, S_028354_SURFACE_SYNC_MASK(0xf));
        r600_store_context_reg(cb, R_028800_DB_DEPTH_CONTROL, 0);
-       r600_store_context_reg(cb, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 0);
+       if (rctx->screen->has_streamout) {
+               r600_store_context_reg(cb, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 0);
+       }
 
        r600_store_loop_const(cb, R_03E200_SQ_LOOP_CONST_0, 0x1000FFF);
        r600_store_loop_const(cb, R_03E200_SQ_LOOP_CONST_0 + (32 * 4), 0x1000FFF);