diff options
author | Rob Clark <[email protected]> | 2017-11-29 15:06:39 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-12-03 14:17:41 -0500 |
commit | e6c6495d3a850da9fc04355df40fc8ab8fa80621 (patch) | |
tree | 59a40c13e74b253222661f445c3d13ed62c0681f /src/gallium/drivers/freedreno/freedreno_draw.c | |
parent | f93f2f7b1e80e838acb4ddc12f62a9a545da5194 (diff) |
freedreno: add debug option to force emulated indirect
Useful mostly for debugging indirect draw.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_draw.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_draw.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index 60a1180f24d..fc24776e4a9 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.c +++ b/src/gallium/drivers/freedreno/freedreno_draw.c @@ -27,6 +27,7 @@ */ #include "pipe/p_state.h" +#include "util/u_draw.h" #include "util/u_string.h" #include "util/u_memory.h" #include "util/u_prim.h" @@ -67,6 +68,15 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) struct pipe_scissor_state *scissor = fd_context_get_scissor(ctx); unsigned i, prims, buffers = 0, restore_buffers = 0; + /* for debugging problems with indirect draw, it is convenient + * to be able to emulate it, to determine if game is feeding us + * bogus data: + */ + if (info->indirect && (fd_mesa_debug & FD_DBG_NOINDR)) { + util_draw_indirect(pctx, info); + return; + } + if (!info->count_from_stream_output && !info->indirect && !info->primitive_restart && !u_trim_pipe_prim(info->mode, (unsigned*)&info->count)) |