r600g: check for R600_STREAMOUT env var in winsys
authorMarek Olšák <maraeo@gmail.com>
Thu, 23 Feb 2012 23:38:33 +0000 (00:38 +0100)
committerMarek Olšák <maraeo@gmail.com>
Mon, 27 Feb 2012 01:03:24 +0000 (02:03 +0100)
src/gallium/drivers/r600/r600_pipe.c
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
src/gallium/winsys/radeon/drm/radeon_winsys.h

index 3a68d479cf01e11f300d85b4ddd083dc3390bf74..9929baa226b4cf3db7c256bc137c3abff948a784 100644 (file)
@@ -421,9 +421,9 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 
        /* Stream output. */
        case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
-               return debug_get_bool_option("R600_STREAMOUT", FALSE) ? 4 : 0;
+               return rscreen->info.r600_has_streamout ? 4 : 0;
        case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
-               return debug_get_bool_option("R600_STREAMOUT", FALSE) ? 1 : 0;
+               return rscreen->info.r600_has_streamout ? 1 : 0;
        case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
        case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
                return 16*4;
index 0c83c68afa99f4892970072279caa239a4ffea56..956fe854b8cd7db0076981efba6325481302825a 100644 (file)
@@ -278,6 +278,7 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws)
                                       &ws->info.r600_backend_map))
                 ws->info.r600_backend_map_valid = TRUE;
         }
+
         ws->info.r600_virtual_address = FALSE;
         if (ws->info.drm_minor >= 13) {
             ws->info.r600_virtual_address = TRUE;
@@ -288,6 +289,9 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws)
                                       &ws->info.r600_ib_vm_max_size))
                 ws->info.r600_virtual_address = FALSE;
         }
+
+       /* XXX don't enable this for R700 yet, it's broken on those asics */
+       ws->info.r600_has_streamout = debug_get_bool_option("R600_STREAMOUT", FALSE);
     }
 
     return TRUE;
index 6fbe765d6b12dd39f7e7622b4090cb766ef4b0f8..ef07d37bc9ac568c98e6523019d094a3441f2d5f 100644 (file)
@@ -99,6 +99,7 @@ struct radeon_info {
     boolean r600_virtual_address;
     uint32_t r600_va_start;
     uint32_t r600_ib_vm_max_size;
+    boolean r600_has_streamout;
 };
 
 enum radeon_feature_id {