mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 07:30:09 +01:00
asahi: Add a noshadow debug flag
This lets us trivially test whether resource shadowing helps or hurts any given workload. Signed-off-by: Asahi Lina <lina@asahilina.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24635>
This commit is contained in:
parent
5f3d784c6c
commit
175e02baed
2 changed files with 5 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ enum agx_dbg {
|
|||
AGX_DBG_SYNCTVB = BITFIELD_BIT(13),
|
||||
AGX_DBG_SMALLTILE = BITFIELD_BIT(14),
|
||||
AGX_DBG_NOMSAA = BITFIELD_BIT(15),
|
||||
AGX_DBG_NOSHADOW = BITFIELD_BIT(16),
|
||||
};
|
||||
|
||||
/* Dummy partial declarations, pending real UAPI */
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ static const struct debug_named_value agx_debug_options[] = {
|
|||
{"synctvb", AGX_DBG_SYNCTVB, "Synchronous TVB growth"},
|
||||
{"smalltile", AGX_DBG_SMALLTILE,"Force 16x16 tiles"},
|
||||
{"nomsaa", AGX_DBG_NOMSAA, "Force disable MSAA"},
|
||||
{"noshadow", AGX_DBG_NOSHADOW, "Force disable resource shadowing"},
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
/* clang-format on */
|
||||
|
|
@ -659,6 +660,9 @@ agx_shadow(struct agx_context *ctx, struct agx_resource *rsrc, bool needs_copy)
|
|||
struct agx_bo *old = rsrc->bo;
|
||||
unsigned flags = old->flags;
|
||||
|
||||
if (dev->debug & AGX_DBG_NOSHADOW)
|
||||
return false;
|
||||
|
||||
/* If a resource is (or could be) shared, shadowing would desync across
|
||||
* processes. (It's also not what this path is for.)
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue