tu: add debug option to force gmem

With autotuner we now want to be able to force gmem rendering,
it will respect existing constraints though.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12128>
This commit is contained in:
Danylo Piliaiev 2021-10-07 15:09:32 +03:00 committed by Marge Bot
parent a4f9c54444
commit 803055ccb4
3 changed files with 5 additions and 0 deletions

View File

@ -616,6 +616,9 @@ use_sysmem_rendering(struct tu_cmd_buffer *cmd,
if (cmd->state.disable_gmem)
return true;
if (unlikely(cmd->device->physical_device->instance->debug_flags & TU_DEBUG_GMEM))
return false;
bool use_sysmem = tu_autotune_use_bypass(&cmd->device->autotune,
cmd, autotune_result);
if (*autotune_result) {

View File

@ -317,6 +317,7 @@ static const struct debug_control tu_debug_options[] = {
{ "nir", TU_DEBUG_NIR },
{ "nobin", TU_DEBUG_NOBIN },
{ "sysmem", TU_DEBUG_SYSMEM },
{ "gmem", TU_DEBUG_GMEM },
{ "forcebin", TU_DEBUG_FORCEBIN },
{ "noubwc", TU_DEBUG_NOUBWC },
{ "nomultipos", TU_DEBUG_NOMULTIPOS },

View File

@ -252,6 +252,7 @@ enum tu_debug_flags
TU_DEBUG_FLUSHALL = 1 << 10,
TU_DEBUG_SYNCDRAW = 1 << 11,
TU_DEBUG_DONT_CARE_AS_LOAD = 1 << 12,
TU_DEBUG_GMEM = 1 << 13,
};
struct tu_instance