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>
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]);
#define BIFROST_DBG_NOIDVS 0x0200
#define BIFROST_DBG_NOSB 0x0400
#define BIFROST_DBG_NOPRELOAD 0x0800
+#define BIFROST_DBG_SPILL 0x1000
extern int bifrost_debug;
{"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
};