diff --git a/src/asahi/lib/agx_device.h b/src/asahi/lib/agx_device.h index 5465f48ef73..dc11926c110 100644 --- a/src/asahi/lib/agx_device.h +++ b/src/asahi/lib/agx_device.h @@ -27,6 +27,7 @@ enum agx_dbg { AGX_DBG_BATCH = BITFIELD_BIT(11), AGX_DBG_NOWC = BITFIELD_BIT(12), AGX_DBG_SYNCTVB = BITFIELD_BIT(13), + AGX_DBG_SMALLTILE = BITFIELD_BIT(14), }; /* 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 eceaf893a23..80c0fbe40c6 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -65,6 +65,7 @@ static const struct debug_named_value agx_debug_options[] = { {"batch", AGX_DBG_BATCH, "Log batches"}, {"nowc", AGX_DBG_NOWC, "Disable write-combining"}, {"synctvb", AGX_DBG_SYNCTVB, "Synchronous TVB growth"}, + {"smalltile", AGX_DBG_SMALLTILE,"Force 16x16 tiles"}, DEBUG_NAMED_VALUE_END }; /* clang-format on */ diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 0e147699928..fe8e075799c 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -1422,6 +1422,9 @@ agx_compile_variant(struct agx_device *dev, struct agx_uncompiled_shader *so, struct agx_tilebuffer_layout tib = agx_build_tilebuffer_layout( key->rt_formats, key->nr_cbufs, key->nr_samples); + if (dev->debug & AGX_DBG_SMALLTILE) + tib.tile_size = (struct agx_tile_size){16, 16}; + nir_lower_blend_options opts = { .scalar_blend_const = true, .logicop_enable = key->blend.logicop_enable, @@ -2250,6 +2253,9 @@ agx_batch_init_state(struct agx_batch *batch) formats, batch->key.nr_cbufs, util_framebuffer_get_num_samples(&batch->key)); + if (agx_device(batch->ctx->base.screen)->debug & AGX_DBG_SMALLTILE) + batch->tilebuffer_layout.tile_size = (struct agx_tile_size){16, 16}; + if (batch->key.zsbuf) { struct agx_resource *rsrc = agx_resource(batch->key.zsbuf->texture); agx_batch_writes(batch, rsrc);