Module: Mesa
Branch: master
Commit: 8befc11186275bc33221b94fb4be35b7be7c4efc
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8befc11186275bc33221b94fb4be35b7be7c4efc

Author: Lucas Stach <l.st...@pengutronix.de>
Date:   Mon Feb  5 15:36:34 2018 +0100

etnaviv: add debug switch to disable single buffer feature

This feature has caused some trouble already. Add a debug switch to
allow users to quickly check if a specific issue is caused by this
feature.

Signed-off-by: Lucas Stach <l.st...@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmei...@gmail.com>

---

 src/gallium/drivers/etnaviv/etnaviv_debug.h  | 1 +
 src/gallium/drivers/etnaviv/etnaviv_screen.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/src/gallium/drivers/etnaviv/etnaviv_debug.h 
b/src/gallium/drivers/etnaviv/etnaviv_debug.h
index f47dffe590..4051e95dd5 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_debug.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_debug.h
@@ -52,6 +52,7 @@
 #define ETNA_DBG_ZERO            0x200000 /* Zero all resources after 
allocation */
 #define ETNA_DBG_DRAW_STALL      0x400000 /* Stall FE/PE after every draw op */
 #define ETNA_DBG_SHADERDB        0x800000 /* dump program compile information 
*/
+#define ETNA_DBG_NO_SINGLEBUF    0x1000000 /* disable single buffer feature */
 
 extern int etna_mesa_debug; /* set in etna_screen.c from ETNA_DEBUG */
 
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c 
b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 3dd628bd9b..f589bd44ea 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -68,6 +68,7 @@ static const struct debug_named_value debug_options[] = {
    {"zero",           ETNA_DBG_ZERO, "Zero all resources after allocation"},
    {"draw_stall",     ETNA_DBG_DRAW_STALL, "Stall FE/PE after each rendered 
primitive"},
    {"shaderdb",       ETNA_DBG_SHADERDB, "Enable shaderdb output"},
+   {"no_singlebuffer",ETNA_DBG_NO_SINGLEBUF, "Disable single buffer feature"},
    DEBUG_NAMED_VALUE_END
 };
 
@@ -963,6 +964,8 @@ etna_screen_create(struct etna_device *dev, struct etna_gpu 
*gpu,
       screen->features[viv_chipMinorFeatures1] &= 
~chipMinorFeatures1_AUTO_DISABLE;
    if (DBG_ENABLED(ETNA_DBG_NO_SUPERTILE))
       screen->specs.can_supertile = 0;
+   if (DBG_ENABLED(ETNA_DBG_NO_SINGLEBUF))
+      screen->specs.single_buffer = 0;
 
    pscreen->destroy = etna_screen_destroy;
    pscreen->get_param = etna_screen_get_param;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to