asahi: Enable scratch debugging
Via ASAHI_MESA_DEBUG=scratch. This will assert if enabled and the scratch workgroup allocation count turns out not to be sufficient (that is, there were failed allocations), to help debug the max occupancy calculation. Signed-off-by: Asahi Lina <lina@asahilina.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
This commit is contained in:
@@ -666,7 +666,7 @@ agx_batch_submit(struct agx_context *ctx, struct agx_batch *batch,
|
||||
free(in_syncs);
|
||||
free(shared_bos);
|
||||
|
||||
if (dev->debug & (AGX_DBG_TRACE | AGX_DBG_SYNC)) {
|
||||
if (dev->debug & (AGX_DBG_TRACE | AGX_DBG_SYNC | AGX_DBG_SCRATCH)) {
|
||||
/* Wait so we can get errors reported back */
|
||||
int ret = drmSyncobjWait(dev->fd, &batch->syncobj, 1, INT64_MAX, 0, NULL);
|
||||
assert(!ret);
|
||||
|
||||
@@ -78,6 +78,7 @@ static const struct debug_named_value agx_debug_options[] = {
|
||||
{"noshadow", AGX_DBG_NOSHADOW, "Force disable resource shadowing"},
|
||||
{"noclipctrl",AGX_DBG_NOCLIPCTRL,"Disable ARB_clip_control"},
|
||||
{"varyings", AGX_DBG_VARYINGS, "Validate varying linkage"},
|
||||
{"scratch", AGX_DBG_SCRATCH, "Debug scratch memory usage"},
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
/* clang-format on */
|
||||
|
||||
Reference in New Issue
Block a user