diff --git a/src/asahi/lib/agx_device.c b/src/asahi/lib/agx_device.c index cdaf3b04e1b..db807dc04e2 100644 --- a/src/asahi/lib/agx_device.c +++ b/src/asahi/lib/agx_device.c @@ -64,6 +64,7 @@ static const struct debug_named_value agx_debug_options[] = { {"feedback", AGX_DBG_FEEDBACK, "Debug feedback loops"}, {"nomsaa", AGX_DBG_NOMSAA, "Force disable MSAA"}, {"noshadow", AGX_DBG_NOSHADOW, "Force disable resource shadowing"}, + {"noborder", AGX_DBG_NOBORDER, "Disable custom border colour emulation"}, {"scratch", AGX_DBG_SCRATCH, "Debug scratch memory usage"}, {"1queue", AGX_DBG_1QUEUE, "Force usage of a single queue for multiple contexts"}, DEBUG_NAMED_VALUE_END diff --git a/src/asahi/lib/agx_device.h b/src/asahi/lib/agx_device.h index 1bca61bb3bb..a78fbe17b00 100644 --- a/src/asahi/lib/agx_device.h +++ b/src/asahi/lib/agx_device.h @@ -44,7 +44,7 @@ enum agx_dbg { AGX_DBG_SMALLTILE = BITFIELD_BIT(14), AGX_DBG_NOMSAA = BITFIELD_BIT(15), AGX_DBG_NOSHADOW = BITFIELD_BIT(16), - /* bit 17 unused */ + AGX_DBG_NOBORDER = BITFIELD_BIT(17), AGX_DBG_SCRATCH = BITFIELD_BIT(18), /* bit 19 unused */ AGX_DBG_FEEDBACK = BITFIELD_BIT(20), diff --git a/src/asahi/vulkan/hk_shader.c b/src/asahi/vulkan/hk_shader.c index 29bc0370e49..20dcfcda9ea 100644 --- a/src/asahi/vulkan/hk_shader.c +++ b/src/asahi/vulkan/hk_shader.c @@ -597,7 +597,10 @@ hk_lower_nir(struct hk_device *dev, nir_shader *nir, * create lod_bias_agx instructions. */ NIR_PASS(_, nir, agx_nir_lower_texture_early, true /* support_lod_bias */); - NIR_PASS(_, nir, agx_nir_lower_custom_border); + + if (!(dev->dev.debug & AGX_DBG_NOBORDER)) { + NIR_PASS(_, nir, agx_nir_lower_custom_border); + } NIR_PASS(_, nir, hk_nir_lower_descriptors, rs, set_layout_count, set_layouts);