mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-21 05:58:22 +02:00
pco: Add debug variables for RA
Adds force spilling control and optimal allocation disabling debug variables. Signed-off-by: Radu Costas <radu.costas@imgtec.com> Reviewed-by: Simon Perretta <simon.perretta@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42078>
This commit is contained in:
parent
3add6b10a8
commit
0e76bb5000
4 changed files with 17 additions and 4 deletions
|
|
@ -2214,6 +2214,12 @@ PowerVR driver environment variables
|
|||
``global_shmem``
|
||||
Force spill shared memory to global memory.
|
||||
|
||||
``ra_force_spill``
|
||||
Force spilling of temps during register allocation.
|
||||
|
||||
``ra_skip_opt``
|
||||
Skip attempting to allocate temps with the optimal amount during RA.
|
||||
|
||||
.. envvar:: PCO_SKIP_PASSES
|
||||
|
||||
A comma-separated list of passes to skip.
|
||||
|
|
|
|||
|
|
@ -33,8 +33,14 @@ static const struct debug_named_value pco_debug_options[] = {
|
|||
PCO_DEBUG_INT_SMP,
|
||||
"Enable integer coordinate support for sampler instructions." },
|
||||
{ "global_shmem",
|
||||
PCO_DEBUG_GLOBAL_SHMEM,
|
||||
"Force spill shared memory to global memory." },
|
||||
PCO_DEBUG_GLOBAL_SHMEM,
|
||||
"Force spill shared memory to global memory." },
|
||||
{ "ra_force_spill",
|
||||
PCO_DEBUG_RA_FORCE_SPILL,
|
||||
"Force spilling of temps during register allocation." },
|
||||
{ "ra_skip_opt",
|
||||
PCO_DEBUG_RA_SKIP_OPT,
|
||||
"Skip attempting to allocate temps with the optimal amount during RA." },
|
||||
DEBUG_NAMED_VALUE_END,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ enum pco_debug {
|
|||
PCO_DEBUG_ALLOC_EXTRA_VTXINS = BITFIELD64_BIT(3),
|
||||
PCO_DEBUG_INT_SMP = BITFIELD64_BIT(4),
|
||||
PCO_DEBUG_GLOBAL_SHMEM = BITFIELD64_BIT(5),
|
||||
PCO_DEBUG_RA_FORCE_SPILL = BITFIELD64_BIT(6),
|
||||
PCO_DEBUG_RA_SKIP_OPT = BITFIELD64_BIT(7),
|
||||
};
|
||||
|
||||
extern uint64_t pco_debug;
|
||||
|
|
|
|||
|
|
@ -808,7 +808,7 @@ static bool pco_ra_func(pco_func *func, pco_ra_ctx *ctx)
|
|||
}
|
||||
|
||||
bool allocated = ra_allocate(ra_graph);
|
||||
bool force_spill = false;
|
||||
bool force_spill = PCO_DEBUG(RA_FORCE_SPILL);
|
||||
if (!allocated || force_spill) {
|
||||
if (!ctx->spilling_setup) {
|
||||
ctx->spill_inst_addr_comps[0] = pco_ref_hwreg(0, PCO_REG_CLASS_TEMP);
|
||||
|
|
@ -1181,7 +1181,6 @@ bool pco_ra(pco_shader *shader)
|
|||
shader->data.common.vtxins =
|
||||
MAX2(shader->data.common.vtxins, func->vtxins);
|
||||
}
|
||||
|
||||
shader->data.common.spilled_temps = ctx.spilled_temps;
|
||||
return progress;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue