Mesa (master): freedreno: add "nogrow" debug param
Rob Clark
robclark at kemper.freedesktop.org
Wed Jan 11 00:41:06 UTC 2017
Module: Mesa
Branch: master
Commit: 99e9dca149e2484c9472a0518eee5e2099bdb251
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=99e9dca149e2484c9472a0518eee5e2099bdb251
Author: Rob Clark <robdclark at gmail.com>
Date: Mon Jan 2 17:22:13 2017 -0500
freedreno: add "nogrow" debug param
Sometimes it is useful to disable the "growable" cmdstream buffers for
debugging. (See 419a154d in libdrm)
Signed-off-by: Rob Clark <robdclark at gmail.com>
---
src/gallium/drivers/freedreno/freedreno_batch.c | 3 ++-
src/gallium/drivers/freedreno/freedreno_screen.c | 1 +
src/gallium/drivers/freedreno/freedreno_util.h | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c
index 646c76f..f5a5c6a 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch.c
+++ b/src/gallium/drivers/freedreno/freedreno_batch.c
@@ -48,7 +48,8 @@ batch_init(struct fd_batch *batch)
* we don't need to grow the ringbuffer. Performance is likely to
* suffer, but there is no good alternative.
*/
- if (fd_device_version(ctx->screen->dev) < FD_VERSION_UNLIMITED_CMDS) {
+ if ((fd_device_version(ctx->screen->dev) < FD_VERSION_UNLIMITED_CMDS) ||
+ (fd_mesa_debug & FD_DBG_NOGROW)){
size = 0x100000;
}
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index 2fafb52..2ff89eb 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -78,6 +78,7 @@ static const struct debug_named_value debug_options[] = {
{"nir", FD_DBG_NIR, "Prefer NIR as native IR"},
{"reorder", FD_DBG_REORDER,"Enable reordering for draws/blits"},
{"bstat", FD_DBG_BSTAT, "Print batch stats at context destroy"},
+ {"nogrow", FD_DBG_NOGROW, "Disable \"growable\" cmdstream buffers, even if kernel supports it"},
DEBUG_NAMED_VALUE_END
};
diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h
index c699f7b..08bc5d7 100644
--- a/src/gallium/drivers/freedreno/freedreno_util.h
+++ b/src/gallium/drivers/freedreno/freedreno_util.h
@@ -79,6 +79,7 @@ enum adreno_stencil_op fd_stencil_op(unsigned op);
#define FD_DBG_NIR 0x4000
#define FD_DBG_REORDER 0x8000
#define FD_DBG_BSTAT 0x10000
+#define FD_DBG_NOGROW 0x20000
extern int fd_mesa_debug;
extern bool fd_binning_enabled;
More information about the mesa-commit
mailing list