summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/freedreno/freedreno_screen.c
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2014-01-07 10:55:07 -0500
committerRob Clark <robclark@freedesktop.org>2014-01-08 16:30:18 -0500
commitc0766528baaef48902c87bbdaa4f5926c472269b (patch)
treef825706059f50c37a9fda7961ec596b0fb6a65da /src/gallium/drivers/freedreno/freedreno_screen.c
parentbfb44c24bc1eff850d47984b2cb60c957ffc143d (diff)
freedreno/a3xx: support for hw binning pass
The binning pass sorts vertices into which bins/tiles they apply to. The visibility information generated during the binning pass can be used to speed up the rendering pass by filtering out vertices which do not apply to the current tile. See: https://github.com/freedreno/freedreno/wiki/Adreno-tiling#optimized-approach This brings a significant fps boost. A rough assortment of tests (supertuxkart, etracer, tremulous, glmark2 'build' test, etc) seems to yield a ~35-45% fps improvement. For now, to be conservative, the binning pass is not enabled yet by default. To enable it use: FD_MESA_DEBUG=binning So far I haven't found anything that breaks with binning enabled, but I'd like a bit more testing before I enable it as default. Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_screen.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index 319e29f3ada..28a09166acd 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -64,12 +64,15 @@ 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"},
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 */
static const char *
fd_screen_get_name(struct pipe_screen *pscreen)
@@ -386,6 +389,12 @@ 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)
+ fd_binning_enabled = false;
+
if (!screen)
return NULL;