diff --git a/src/asahi/lib/agx_device.h b/src/asahi/lib/agx_device.h index 837a63be59a..6e90132a197 100644 --- a/src/asahi/lib/agx_device.h +++ b/src/asahi/lib/agx_device.h @@ -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 */ diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 720242fe246..5a0fa7ff1a5 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -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.) */