mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 09:10:12 +01:00
pan/bi: Add option to test spilling
BIFROST_MESA_DEBUG=spill now restricts the register file to 1/4 its usual size, useful for testing register spilling (e.g. running CTS) as well as debugging spilling on small shaders. Note blend shaders are exempt, as we don't allow blend shaders to spill. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16314>
This commit is contained in:
parent
961b18ccbc
commit
6b6ace5199
3 changed files with 6 additions and 0 deletions
|
|
@ -314,6 +314,10 @@ bi_allocate_registers(bi_context *ctx, bool *success, bool full_regs)
|
|||
full_regs ? BITFIELD64_MASK(64) :
|
||||
(BITFIELD64_MASK(16) | (BITFIELD64_MASK(16) << 48));
|
||||
|
||||
/* To test spilling, mimic a small register file */
|
||||
if (bifrost_debug & BIFROST_DBG_SPILL && !ctx->inputs->is_blend)
|
||||
default_affinity &= BITFIELD64_MASK(48) << 8;
|
||||
|
||||
bi_foreach_instr_global(ctx, ins) {
|
||||
bi_foreach_dest(ins, d) {
|
||||
unsigned dest = bi_get_node(ins->dest[d]);
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ extern "C" {
|
|||
#define BIFROST_DBG_NOIDVS 0x0200
|
||||
#define BIFROST_DBG_NOSB 0x0400
|
||||
#define BIFROST_DBG_NOPRELOAD 0x0800
|
||||
#define BIFROST_DBG_SPILL 0x1000
|
||||
|
||||
extern int bifrost_debug;
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ static const struct debug_named_value bifrost_debug_options[] = {
|
|||
{"noidvs", BIFROST_DBG_NOIDVS, "Disable IDVS"},
|
||||
{"nosb", BIFROST_DBG_NOSB, "Disable scoreboarding"},
|
||||
{"nopreload", BIFROST_DBG_NOPRELOAD, "Disable message preloading"},
|
||||
{"spill", BIFROST_DBG_SPILL, "Test register spilling"},
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue