freedreno: Add a nohw flag to skip submitting to the kernel.

For some CPU-side-only optimizations, it can be nice to disable rendering
so that we can see what the impact is even on cases where the GPU can't
quite keep up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4996>
This commit is contained in:
Eric Anholt 2020-05-11 13:53:48 -07:00 committed by Marge Bot
parent a43e974064
commit fdcadf611e
3 changed files with 5 additions and 0 deletions

View File

@ -612,6 +612,9 @@ flush_ring(struct fd_batch *batch)
uint32_t timestamp;
int out_fence_fd = -1;
if (unlikely(fd_mesa_debug & FD_DBG_NOHW))
return;
fd_submit_flush(batch->submit, batch->in_fence_fd,
batch->needs_out_fence_fd ? &out_fence_fd : NULL,
&timestamp);

View File

@ -90,6 +90,7 @@ static const struct debug_named_value debug_options[] = {
{"notile", FD_DBG_NOTILE, "Disable tiling for all internal buffers"},
{"layout", FD_DBG_LAYOUT, "Dump resource layouts"},
{"nofp16", FD_DBG_NOFP16, "Disable mediump precision lowering"},
{"nohw", FD_DBG_NOHW, "Disable submitting commands to the HW"},
DEBUG_NAMED_VALUE_END
};

View File

@ -90,6 +90,7 @@ enum fd_debug_flag {
FD_DBG_NOTILE = BITFIELD_BIT(25),
FD_DBG_LAYOUT = BITFIELD_BIT(26),
FD_DBG_NOFP16 = BITFIELD_BIT(27),
FD_DBG_NOHW = BITFIELD_BIT(28),
};
extern int fd_mesa_debug;