}
else if ((usage & PIPE_TRANSFER_DISCARD_RANGE) &&
!(usage & PIPE_TRANSFER_UNSYNCHRONIZED) &&
+ !(rctx->screen->debug_flags & DBG_NO_DISCARD_RANGE) &&
(rctx->screen->has_cp_dma ||
(rctx->screen->has_streamout &&
/* The buffer range must be aligned to 4 with streamout. */
#if defined(R600_USE_LLVM)
{ "nollvm", DBG_NO_LLVM, "Disable the LLVM shader compiler" },
#endif
+ { "nocpdma", DBG_NO_CP_DMA, "Disable CP DMA" },
+ { "nodma", DBG_NO_ASYNC_DMA, "Disable asynchronous DMA" },
+ /* GL uses the word INVALIDATE, gallium uses the word DISCARD */
+ { "noinvalrange", DBG_NO_DISCARD_RANGE, "Disable handling of INVALIDATE_RANGE map flags" },
DEBUG_NAMED_VALUE_END /* must be last */
};
rctx->rings.gfx.flushing = false;
rctx->rings.dma.cs = NULL;
- if (rscreen->info.r600_has_dma) {
+ if (rscreen->info.r600_has_dma && !(rscreen->debug_flags & DBG_NO_ASYNC_DMA)) {
rctx->rings.dma.cs = rctx->ws->cs_create(rctx->ws, RING_DMA);
rctx->rings.dma.flush = r600_flush_dma_ring;
rctx->ws->cs_set_flush_callback(rctx->rings.dma.cs, r600_flush_dma_from_winsys, rctx);
break;
}
- rscreen->has_cp_dma = rscreen->info.drm_minor >= 27;
+ rscreen->has_cp_dma = rscreen->info.drm_minor >= 27 &&
+ !(rscreen->debug_flags & DBG_NO_CP_DMA);
if (r600_init_tiling(rscreen)) {
FREE(rscreen);
/* features */
#define DBG_NO_HYPERZ (1 << 16)
#define DBG_NO_LLVM (1 << 17)
+#define DBG_NO_CP_DMA (1 << 18)
+#define DBG_NO_ASYNC_DMA (1 << 19)
+#define DBG_NO_DISCARD_RANGE (1 << 20)
struct r600_tiling_info {
unsigned num_channels;