summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2017-01-02 17:22:13 -0500
committerRob Clark <[email protected]>2017-01-10 19:40:00 -0500
commit99e9dca149e2484c9472a0518eee5e2099bdb251 (patch)
tree7f0def38b6df61092e72198c8b31c783b275ed0a /src
parenta43f3b895c1906f92b671b1afe7859125623d5f7 (diff)
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_batch.c3
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c1
-rw-r--r--src/gallium/drivers/freedreno/freedreno_util.h1
3 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c
index 646c76fb57d..f5a5c6a3cc9 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 2fafb52b190..2ff89eb0f37 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 c699f7badff..08bc5d7ba4a 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;