aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorKristian H. Kristensen <[email protected]>2019-11-25 21:14:31 -0800
committerKristian H. Kristensen <[email protected]>2019-12-19 09:56:05 -0800
commita2f6c44a1c314d8b5f85bba0453523efb7221820 (patch)
treef390b697b4656b0a2019136901a85c87003f28aa /src/gallium/drivers/freedreno
parentd908a2ab1845235fb1ce3afdf7a0984b56e1546c (diff)
freedreno: Add debug flag for forcing linear layouts
Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c3
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c1
-rw-r--r--src/gallium/drivers/freedreno/freedreno_util.h54
3 files changed, 33 insertions, 25 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 10e9196886f..d1df32cab9a 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -963,6 +963,9 @@ fd_resource_create_with_modifiers(struct pipe_screen *pscreen,
if (tmpl->bind & LINEAR)
linear = true;
+ if (fd_mesa_debug & FD_DBG_NOTILE)
+ linear = true;
+
/* Normally, for non-shared buffers, allow buffer compression if
* not shared, otherwise only allow if QCOM_COMPRESSED modifier
* is requested:
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index 9113b4ef6b3..d467cae6b00 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -90,6 +90,7 @@ static const struct debug_named_value debug_options[] = {
{"perfcntrs", FD_DBG_PERFC, "Expose performance counters"},
{"noubwc", FD_DBG_NOUBWC, "Disable UBWC for all internal buffers"},
{"nolrz", FD_DBG_NOLRZ, "Disable LRZ (a6xx)"},
+ {"notile", FD_DBG_NOTILE, "Disable tiling for all internal buffers"},
DEBUG_NAMED_VALUE_END
};
diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h
index b0dc3e91baa..33b38472d69 100644
--- a/src/gallium/drivers/freedreno/freedreno_util.h
+++ b/src/gallium/drivers/freedreno/freedreno_util.h
@@ -61,31 +61,35 @@ enum adreno_stencil_op fd_stencil_op(unsigned op);
#define MAX_RENDER_TARGETS A6XX_MAX_RENDER_TARGETS
-#define FD_DBG_MSGS 0x0001
-#define FD_DBG_DISASM 0x0002
-#define FD_DBG_DCLEAR 0x0004
-#define FD_DBG_DDRAW 0x0008
-#define FD_DBG_NOSCIS 0x0010
-#define FD_DBG_DIRECT 0x0020
-#define FD_DBG_NOBYPASS 0x0040
-#define FD_DBG_FRAGHALF 0x0080
-#define FD_DBG_NOBIN 0x0100
-#define FD_DBG_NOGMEM 0x0200
-#define FD_DBG_GLSL120 0x0400
-#define FD_DBG_SHADERDB 0x0800
-#define FD_DBG_FLUSH 0x1000
-#define FD_DBG_DEQP 0x2000
-#define FD_DBG_INORDER 0x4000
-#define FD_DBG_BSTAT 0x8000
-#define FD_DBG_NOGROW 0x10000
-#define FD_DBG_LRZ 0x20000
-#define FD_DBG_NOINDR 0x40000
-#define FD_DBG_NOBLIT 0x80000
-#define FD_DBG_HIPRIO 0x100000
-#define FD_DBG_TTILE 0x200000
-#define FD_DBG_PERFC 0x400000
-#define FD_DBG_NOUBWC 0x800000
-#define FD_DBG_NOLRZ 0x1000000
+enum fd_debug_flag {
+ FD_DBG_MSGS = BITFIELD_BIT(0),
+ FD_DBG_DISASM = BITFIELD_BIT(1),
+ FD_DBG_DCLEAR = BITFIELD_BIT(2),
+ FD_DBG_DDRAW = BITFIELD_BIT(3),
+ FD_DBG_NOSCIS = BITFIELD_BIT(4),
+ FD_DBG_DIRECT = BITFIELD_BIT(5),
+ FD_DBG_NOBYPASS = BITFIELD_BIT(6),
+ FD_DBG_FRAGHALF = BITFIELD_BIT(7),
+ FD_DBG_NOBIN = BITFIELD_BIT(8),
+ FD_DBG_NOGMEM = BITFIELD_BIT(9),
+ FD_DBG_GLSL120 = BITFIELD_BIT(10),
+ FD_DBG_SHADERDB = BITFIELD_BIT(11),
+ FD_DBG_FLUSH = BITFIELD_BIT(12),
+ FD_DBG_DEQP = BITFIELD_BIT(13),
+ FD_DBG_INORDER = BITFIELD_BIT(14),
+ FD_DBG_BSTAT = BITFIELD_BIT(15),
+ FD_DBG_NOGROW = BITFIELD_BIT(16),
+ FD_DBG_LRZ = BITFIELD_BIT(17),
+ FD_DBG_NOINDR = BITFIELD_BIT(18),
+ FD_DBG_NOBLIT = BITFIELD_BIT(19),
+ FD_DBG_HIPRIO = BITFIELD_BIT(20),
+ FD_DBG_TTILE = BITFIELD_BIT(21),
+ FD_DBG_PERFC = BITFIELD_BIT(22),
+ FD_DBG_NOUBWC = BITFIELD_BIT(23),
+ FD_DBG_NOLRZ = BITFIELD_BIT(24),
+ FD_DBG_NOTILE = BITFIELD_BIT(25),
+};
+
extern int fd_mesa_debug;
extern bool fd_binning_enabled;