freedreno: enabling binning and opt by default
authorRob Clark <robclark@freedesktop.org>
Mon, 3 Feb 2014 16:28:30 +0000 (11:28 -0500)
committerRob Clark <robclark@freedesktop.org>
Mon, 3 Feb 2014 23:26:53 +0000 (18:26 -0500)
Hw binning pass doesn't seem to have broken anything.  And optimizing
compiler fixes a lot of shaders and doesn't seem to break anything.  So
re-org slightly FD_MESA_DEBUG params and make both hw binning and
optimizer enabled by default.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a3xx/fd3_program.c
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/freedreno/freedreno_util.h

index 793e703b72689bcc997f7a8ec8571bcd804f5c14..b4c089cce6ae1b7fcecebbc03cf3e70483dea784 100644 (file)
@@ -107,7 +107,7 @@ create_shader(struct pipe_context *pctx, const struct pipe_shader_state *cso,
                so->half_precision = true;
 
 
-       if (fd_mesa_debug & FD_DBG_OPTIMIZE) {
+       if (!(fd_mesa_debug & FD_DBG_NOOPT)) {
                ret = fd3_compile_shader(so, tokens);
                if (ret) {
                        debug_error("new compiler failed, trying fallback!");
index f6affd6c417505ff617f0f27f957e5f14bdd237a..f1822268851b3a3e834a10329e66a5ec46f63206 100644 (file)
@@ -65,18 +65,17 @@ static const struct debug_named_value debug_options[] = {
                {"direct",    FD_DBG_DIRECT, "Force inline (SS_DIRECT) state loads"},
                {"dbypass",   FD_DBG_DBYPASS,"Disable GMEM bypass"},
                {"fraghalf",  FD_DBG_FRAGHALF, "Use half-precision in fragment shader"},
-               {"binning",   FD_DBG_BINNING,  "Enable hw binning"},
-               {"dbinning",  FD_DBG_DBINNING, "Disable hw binning"},
-               {"optimize",  FD_DBG_OPTIMIZE, "Enable optimization passes in compiler"},
-               {"optmsgs",   FD_DBG_OPTMSGS,  "Enable optimizater debug messages"},
-               {"optdump",   FD_DBG_OPTDUMP,  "Dump shader DAG to .dot files"},
+               {"nobin",     FD_DBG_NOBIN,  "Disable hw binning"},
+               {"noopt",     FD_DBG_NOOPT , "Disable optimization passes in compiler"},
+               {"optmsgs",   FD_DBG_OPTMSGS,"Enable optimizater debug messages"},
+               {"optdump",   FD_DBG_OPTDUMP,"Dump shader DAG to .dot files"},
                DEBUG_NAMED_VALUE_END
 };
 
 DEBUG_GET_ONCE_FLAGS_OPTION(fd_mesa_debug, "FD_MESA_DEBUG", debug_options, 0)
 
 int fd_mesa_debug = 0;
-bool fd_binning_enabled = false; /* default to off for now */
+bool fd_binning_enabled = true;
 
 static const char *
 fd_screen_get_name(struct pipe_screen *pscreen)
@@ -395,10 +394,7 @@ fd_screen_create(struct fd_device *dev)
 
        fd_mesa_debug = debug_get_option_fd_mesa_debug();
 
-       if (fd_mesa_debug & FD_DBG_BINNING)
-               fd_binning_enabled = true;
-
-       if (fd_mesa_debug & FD_DBG_DBINNING)
+       if (fd_mesa_debug & FD_DBG_NOBIN)
                fd_binning_enabled = false;
 
        if (!screen)
index 43026c5575401fdd183e3f2d5233850dbeb6fa77..356f4165792f432f1744f665b241cece482ea8fd 100644 (file)
@@ -61,11 +61,10 @@ enum adreno_stencil_op fd_stencil_op(unsigned op);
 #define FD_DBG_DIRECT   0x0020
 #define FD_DBG_DBYPASS  0x0040
 #define FD_DBG_FRAGHALF 0x0080
-#define FD_DBG_BINNING  0x0100
-#define FD_DBG_DBINNING 0x0200
-#define FD_DBG_OPTIMIZE 0x0400
-#define FD_DBG_OPTMSGS  0x0800
-#define FD_DBG_OPTDUMP  0x1000
+#define FD_DBG_NOBIN    0x0100
+#define FD_DBG_NOOPT    0x0200
+#define FD_DBG_OPTMSGS  0x0400
+#define FD_DBG_OPTDUMP  0x0800
 
 extern int fd_mesa_debug;
 extern bool fd_binning_enabled;