From 0e08923a7bc4418124bebb77fd2b8cf65c019e8c Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Wed, 5 Jul 2023 20:28:46 +0900 Subject: [PATCH] asahi: Add nomsaa debug flag This forces off MSAA, which together with smalltile mode helps test more combinations. Signed-off-by: Asahi Lina Part-of: --- src/asahi/lib/agx_device.h | 1 + src/gallium/drivers/asahi/agx_pipe.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/asahi/lib/agx_device.h b/src/asahi/lib/agx_device.h index dc11926c110..47385402a7d 100644 --- a/src/asahi/lib/agx_device.h +++ b/src/asahi/lib/agx_device.h @@ -28,6 +28,7 @@ enum agx_dbg { AGX_DBG_NOWC = BITFIELD_BIT(12), AGX_DBG_SYNCTVB = BITFIELD_BIT(13), AGX_DBG_SMALLTILE = BITFIELD_BIT(14), + AGX_DBG_NOMSAA = BITFIELD_BIT(15), }; /* 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 80c0fbe40c6..2fd07a2ca40 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -66,6 +66,7 @@ static const struct debug_named_value agx_debug_options[] = { {"nowc", AGX_DBG_NOWC, "Disable write-combining"}, {"synctvb", AGX_DBG_SYNCTVB, "Synchronous TVB growth"}, {"smalltile", AGX_DBG_SMALLTILE,"Force 16x16 tiles"}, + {"nomsaa", AGX_DBG_NOMSAA, "Force disable MSAA"}, DEBUG_NAMED_VALUE_END }; /* clang-format on */ @@ -1884,6 +1885,9 @@ agx_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, if (sample_count > 1 && sample_count != 4 && sample_count != 2) return false; + if (sample_count > 1 && agx_device(pscreen)->debug & AGX_DBG_NOMSAA) + return false; + if (MAX2(sample_count, 1) != MAX2(storage_sample_count, 1)) return false;