diff --git a/src/asahi/lib/agx_device.h b/src/asahi/lib/agx_device.h index 714d890709b..6ded5967819 100644 --- a/src/asahi/lib/agx_device.h +++ b/src/asahi/lib/agx_device.h @@ -33,6 +33,7 @@ enum agx_dbg { AGX_DBG_NOSHADOW = BITFIELD_BIT(16), AGX_DBG_VARYINGS = BITFIELD_BIT(17), AGX_DBG_SCRATCH = BITFIELD_BIT(18), + AGX_DBG_COMPBLIT = BITFIELD_BIT(19), }; /* Dummy partial declarations, pending real UAPI */ diff --git a/src/gallium/drivers/asahi/agx_blit.c b/src/gallium/drivers/asahi/agx_blit.c index 548aafe0e6f..2b077b6e95d 100644 --- a/src/gallium/drivers/asahi/agx_blit.c +++ b/src/gallium/drivers/asahi/agx_blit.c @@ -102,9 +102,6 @@ asahi_blit_compute_shader(struct pipe_context *ctx, enum asahi_blit_clamp clamp, static bool asahi_compute_blit_supported(const struct pipe_blit_info *info) { - /* XXX: Hot fix. compute blits broken on G13X? needs investigation */ - return false; -#if 0 return (info->src.box.depth == info->dst.box.depth) && !info->alpha_blend && !info->num_window_rectangles && !info->sample0_only && !info->scissor_enable && !info->window_rectangle_include && @@ -121,7 +118,6 @@ asahi_compute_blit_supported(const struct pipe_blit_info *info) info->dst.format != PIPE_FORMAT_R5G6B5_UNORM && info->dst.format != PIPE_FORMAT_R5G5B5A1_UNORM && info->dst.format != PIPE_FORMAT_R5G5B5X1_UNORM; -#endif } static void @@ -383,6 +379,7 @@ agx_blit(struct pipe_context *pipe, const struct pipe_blit_info *info) info->src.format); if (asahi_compute_blit_supported(info) && + (agx_device(pipe->screen)->debug & AGX_DBG_COMPBLIT) && !(ail_is_compressed(&agx_resource(info->dst.resource)->layout) && util_format_get_blocksize(info->dst.format) == 16)) { diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index d10622587f9..58a05eee432 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -64,6 +64,7 @@ static const struct debug_named_value agx_debug_options[] = { #ifndef NDEBUG {"dirty", AGX_DBG_DIRTY, "Disable dirty tracking"}, #endif + {"compblit", AGX_DBG_COMPBLIT, "Enable compute blitter"}, {"precompile",AGX_DBG_PRECOMPILE,"Precompile shaders for shader-db"}, {"nocompress",AGX_DBG_NOCOMPRESS,"Disable lossless compression"}, {"nocluster", AGX_DBG_NOCLUSTER,"Disable vertex clustering"},