aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2019-06-24 10:30:52 -0700
committerChia-I Wu <[email protected]>2019-06-25 12:01:14 -0700
commit119b5701e1466450031a0acf627059ee4e643395 (patch)
tree106c0eece5ae51c7e49cdc864ef53deb7754def1
parent8ea7ee153649ac07c8418cc0d4aa5a4e123d19d1 (diff)
virgl: fix the value of VIRGL_DEBUG_BGRA_DEST_SWIZZLE
VIRGL_DEBUG_BGRA_DEST_SWIZZLE should use bit 3. Make some cosmetic changes as well. Fixes: a478e56fbd33fa23503b63d41265a1c2f3253ed2 virgl: Add debug flag to bypass driconf to enable the BGRA tweaks Signed-off-by: Chia-I Wu <[email protected]> Reviewed-By: Gert Wollny <[email protected]> Reviewed-By: Alexandros Frantzis <[email protected]>
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.c8
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.h10
2 files changed, 10 insertions, 8 deletions
diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index b2e3117c383..684a2f98546 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -41,10 +41,10 @@
int virgl_debug = 0;
static const struct debug_named_value debug_options[] = {
- { "verbose", VIRGL_DEBUG_VERBOSE, NULL },
- { "tgsi", VIRGL_DEBUG_TGSI, NULL },
- { "emubgra", VIRGL_DEBUG_EMULATE_BGRA, "Enable tweak to emulate BGRA as RGBA on GLES hosts"},
- { "bgraswz", VIRGL_DEBUG_BGRA_DEST_SWIZZLE, "Enable tweak to swizzle emulated BGRA on GLES hosts" },
+ { "verbose", VIRGL_DEBUG_VERBOSE, NULL },
+ { "tgsi", VIRGL_DEBUG_TGSI, NULL },
+ { "emubgra", VIRGL_DEBUG_EMULATE_BGRA, "Enable tweak to emulate BGRA as RGBA on GLES hosts"},
+ { "bgraswz", VIRGL_DEBUG_BGRA_DEST_SWIZZLE, "Enable tweak to swizzle emulated BGRA on GLES hosts" },
DEBUG_NAMED_VALUE_END
};
DEBUG_GET_ONCE_FLAGS_OPTION(virgl_debug, "VIRGL_DEBUG", debug_options, 0)
diff --git a/src/gallium/drivers/virgl/virgl_screen.h b/src/gallium/drivers/virgl/virgl_screen.h
index b7535527b9e..e27ceee7bda 100644
--- a/src/gallium/drivers/virgl/virgl_screen.h
+++ b/src/gallium/drivers/virgl/virgl_screen.h
@@ -27,10 +27,12 @@
#include "util/slab.h"
#include "virgl_winsys.h"
-#define VIRGL_DEBUG_VERBOSE 1
-#define VIRGL_DEBUG_TGSI 2
-#define VIRGL_DEBUG_EMULATE_BGRA 4
-#define VIRGL_DEBUG_BGRA_DEST_SWIZZLE 4
+enum virgl_debug_flags {
+ VIRGL_DEBUG_VERBOSE = 1 << 0,
+ VIRGL_DEBUG_TGSI = 1 << 1,
+ VIRGL_DEBUG_EMULATE_BGRA = 1 << 2,
+ VIRGL_DEBUG_BGRA_DEST_SWIZZLE = 1 << 3,
+};
extern int virgl_debug;