freedreno/a3xx: only emit dirty consts
[mesa.git] / src / gallium / drivers / radeonsi / si_pipe.c
index b63c5d7fef9402926f79df5ff092c0bdf71947b2..cba6d98f29cf4dee417d7cdbe3dd2dc4ef1db119 100644 (file)
@@ -38,6 +38,8 @@ static void si_destroy_context(struct pipe_context *context)
 
        si_release_all_descriptors(sctx);
 
+       pipe_resource_reference(&sctx->esgs_ring, NULL);
+       pipe_resource_reference(&sctx->gsvs_ring, NULL);
        pipe_resource_reference(&sctx->null_const_buf.buffer, NULL);
        r600_resource_reference(&sctx->border_color_table, NULL);
 
@@ -92,7 +94,8 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, void *
        }
 
        sctx->b.rings.gfx.cs = ws->cs_create(ws, RING_GFX, si_context_gfx_flush,
-                                            sctx, NULL);
+                                            sctx, sscreen->b.trace_bo ?
+                                               sscreen->b.trace_bo->cs_buf : NULL);
        sctx->b.rings.gfx.flush = si_context_gfx_flush;
 
        si_init_all_descriptors(sctx);
@@ -118,6 +121,9 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, void *
                goto fail;
        }
 
+       if (sscreen->b.debug_flags & DBG_FORCE_DMA)
+               sctx->b.b.resource_copy_region = sctx->b.dma_copy;
+
        sctx->blitter = util_blitter_create(&sctx->b.b);
        if (sctx->blitter == NULL)
                goto fail;
@@ -244,6 +250,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
        case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE:
        case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
+       case PIPE_CAP_SAMPLER_VIEW_TARGET:
                return 0;
 
        case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK: