agx: add =spill debug option
to force spilling so we can exercise the new code. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
This commit is contained in:
committed by
Marge Bot
parent
42084d50e5
commit
8a2c1d337e
@@ -36,6 +36,7 @@ static const struct debug_named_value agx_debug_options[] = {
|
||||
{"nopreamble",AGX_DBG_NOPREAMBLE,"Do not use shader preambles"},
|
||||
{"demand", AGX_DBG_DEMAND, "Bound tightly to register demand"},
|
||||
{"nosched", AGX_DBG_NOSCHED, "Do not schedule the shader"},
|
||||
{"spill", AGX_DBG_SPILL, "Spill (almost) everything"},
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
/* clang-format on */
|
||||
|
||||
@@ -26,6 +26,7 @@ enum agx_compiler_dbg {
|
||||
AGX_DBG_NOPREAMBLE = BITFIELD_BIT(8),
|
||||
AGX_DBG_DEMAND = BITFIELD_BIT(9),
|
||||
AGX_DBG_NOSCHED = BITFIELD_BIT(10),
|
||||
AGX_DBG_SPILL = BITFIELD_BIT(11),
|
||||
};
|
||||
/* clang-format on */
|
||||
|
||||
|
||||
@@ -1148,6 +1148,7 @@ agx_ra(agx_context *ctx)
|
||||
agx_compute_liveness(ctx);
|
||||
unsigned effective_demand = agx_calc_register_demand(ctx);
|
||||
bool spilling = (effective_demand > max_possible_regs);
|
||||
spilling |= ((agx_compiler_debug & AGX_DBG_SPILL) && ctx->key->has_scratch);
|
||||
|
||||
if (spilling) {
|
||||
assert(ctx->key->has_scratch && "internal shaders are unspillable");
|
||||
|
||||
Reference in New Issue
Block a user