intel/blorp: generate the fast_clear_surf shaders later

Because blorp_params_get_clear_kernel() calls
blorp_params_get_clear_kernel_cs(), which reads params->num_samples,
which we have not properly set yet at this point.

I am also planning to have the functions that create the shader to
rely on params.op, which we have not set yet either.

I found this by inspection (when writing another patch), I'm not sure
if this fixes something relevant, but it may be relevant to ver >= 30
multi-sampled cases.

Fixes: de0c547448 ("blorp: Handle 2D MSAA array image copies on compute shader")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39046>
This commit is contained in:
Paulo Zanoni 2026-01-05 11:57:01 -08:00 committed by Marge Bot
parent e360afdb8a
commit a8dd4382bf

View file

@ -490,9 +490,6 @@ fast_clear_surf(struct blorp_batch *batch,
get_fast_clear_rect(batch->blorp->isl_dev, surf->surf, surf->aux_surf,
&params.x0, &params.y0, &params.x1, &params.y1);
if (!blorp_params_get_clear_kernel(batch, &params, true, true, false))
return;
blorp_surface_info_init(batch, &params.dst, surf, level,
start_layer, format, true);
@ -513,6 +510,9 @@ fast_clear_surf(struct blorp_batch *batch,
else
params.op = BLORP_OP_MCS_COLOR_CLEAR;
if (!blorp_params_get_clear_kernel(batch, &params, true, true, false))
return;
batch->blorp->exec(batch, &params);
}