diff options
author | Rob Clark <[email protected]> | 2013-05-26 20:36:35 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2013-06-08 13:15:51 -0400 |
commit | 4af1dcbb7d5431ae75cc39568c99d7a20231f081 (patch) | |
tree | efaabfa4fd8b137483b2386a1b3fcc91f9fcd9a9 /src/gallium/drivers/freedreno/freedreno_state.h | |
parent | 2855f3f7bcd9b36a275e942c9c7d0eb8e485c16f (diff) |
freedreno: gmem bypass
The GPU (at least a3xx, but I think also a2xx) can render directly to
memory, bypassing tiling. Although it can't do this if blend, depth,
and a few other features of the pipeline are enabled. This direct
memory mode can be faster for some sorts of operations, such as simple
blits. In particular, this significantly speeds up XA by avoiding to
pull the entire dest pixmap into GMEM, render tiles, and write it all
back out again. This should also speed up resource copy-region and
blit.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_state.h')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_state.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_state.h b/src/gallium/drivers/freedreno/freedreno_state.h index c966bdcc51d..859299b3ad3 100644 --- a/src/gallium/drivers/freedreno/freedreno_state.h +++ b/src/gallium/drivers/freedreno/freedreno_state.h @@ -34,12 +34,22 @@ static inline bool fd_depth_enabled(struct fd_context *ctx) { - return ctx->zsa->depth.enabled; + return ctx->zsa && ctx->zsa->depth.enabled; } static inline bool fd_stencil_enabled(struct fd_context *ctx) { - return ctx->zsa->stencil[0].enabled; + return ctx->zsa && ctx->zsa->stencil[0].enabled; +} + +static inline bool fd_logicop_enabled(struct fd_context *ctx) +{ + return ctx->blend && ctx->blend->logicop_enable; +} + +static inline bool fd_blend_enabled(struct fd_context *ctx, unsigned n) +{ + return ctx->blend && ctx->blend->rt[n].blend_enable; } void fd_state_init(struct pipe_context *pctx); |