radeonsi: add AMD_DEBUG=nowcstream to enable caching for stream_uploader

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21860>
This commit is contained in:
Marek Olšák 2023-03-12 18:13:31 -04:00 committed by Marge Bot
parent e32700c503
commit f8070b3dc2
2 changed files with 5 additions and 1 deletions

View file

@ -87,6 +87,7 @@ static const struct debug_named_value radeonsi_debug_options[] = {
/* Driver options: */
{"nowc", DBG(NO_WC), "Disable GTT write combining"},
{"nowcstream", DBG(NO_WC_STREAM), "Disable GTT write combining for streaming uploads"},
{"check_vm", DBG(CHECK_VM), "Check VM faults and dump debug info."},
{"reserve_vmid", DBG(RESERVE_VMID), "Force VMID reservation per context."},
{"shadowregs", DBG(SHADOW_REGS), "Enable CP register shadowing."},
@ -563,7 +564,9 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, unsign
*/
bool is_apu = !sscreen->info.has_dedicated_vram;
sctx->b.stream_uploader =
u_upload_create(&sctx->b, 1024 * 1024, 0, PIPE_USAGE_STREAM,
u_upload_create(&sctx->b, 1024 * 1024, 0,
sscreen->debug_flags & DBG(NO_WC_STREAM) ? PIPE_USAGE_STAGING
: PIPE_USAGE_STREAM,
SI_RESOURCE_FLAG_32BIT); /* same flags as const_uploader */
if (!sctx->b.stream_uploader) {
fprintf(stderr, "radeonsi: can't create stream_uploader\n");

View file

@ -224,6 +224,7 @@ enum
/* Driver options: */
DBG_NO_WC,
DBG_NO_WC_STREAM,
DBG_CHECK_VM,
DBG_RESERVE_VMID,
DBG_SHADOW_REGS,