freedreno: Force single wavesize if double threadsize is unsupported

Turns out ir3 isn't enforcing this itself.

Fixes: c323848b0b ("ir3, tu: Plumb through support for per-shader robustness")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39470>
(cherry picked from commit 455b692e4f)
This commit is contained in:
Rob Clark 2026-01-22 16:02:16 -08:00 committed by Eric Engestrom
parent e1dae01299
commit 4aa5731f09
2 changed files with 16 additions and 8 deletions

View file

@ -3354,7 +3354,7 @@
"description": "freedreno: Force single wavesize if double threadsize is unsupported",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "c323848b0b70686e856d69699356b8cd71ddb6c8",
"notes": null

View file

@ -268,6 +268,11 @@ ir3_shader_compute_state_create(struct pipe_context *pctx,
enum ir3_wavesize_option api_wavesize = IR3_SINGLE_OR_DOUBLE;
enum ir3_wavesize_option real_wavesize = IR3_SINGLE_OR_DOUBLE;
if (ctx->screen->gen >= 6 && !ctx->screen->info->props.supports_double_threadsize) {
api_wavesize = IR3_SINGLE_ONLY;
real_wavesize = IR3_SINGLE_ONLY;
}
const struct ir3_shader_options ir3_options = {
/* TODO: force to single on a6xx with legacy ballot extension that uses
* 64-bit masks
@ -293,11 +298,6 @@ ir3_shader_compute_state_create(struct pipe_context *pctx,
if (ctx->screen->gen >= 6)
ir3_nir_lower_io_to_bindless(nir);
if (ctx->screen->gen >= 6 && !ctx->screen->info->props.supports_double_threadsize) {
api_wavesize = IR3_SINGLE_ONLY;
real_wavesize = IR3_SINGLE_ONLY;
}
struct ir3_shader *shader =
ir3_shader_from_nir(compiler, nir, &ir3_options, NULL);
shader->cs.req_local_mem = cso->static_shared_mem;
@ -352,6 +352,14 @@ ir3_shader_state_create(struct pipe_context *pctx,
if (ctx->screen->gen >= 6)
ir3_nir_lower_io_to_bindless(nir);
enum ir3_wavesize_option api_wavesize = IR3_SINGLE_OR_DOUBLE;
enum ir3_wavesize_option real_wavesize = IR3_SINGLE_OR_DOUBLE;
if (ctx->screen->gen >= 6 && !ctx->screen->info->props.supports_double_threadsize) {
api_wavesize = IR3_SINGLE_ONLY;
real_wavesize = IR3_SINGLE_ONLY;
}
/*
* Create ir3_shader:
*
@ -366,8 +374,8 @@ ir3_shader_state_create(struct pipe_context *pctx,
/* TODO: force to single on a6xx with legacy
* ballot extension that uses 64-bit masks
*/
.api_wavesize = IR3_SINGLE_OR_DOUBLE,
.real_wavesize = IR3_SINGLE_OR_DOUBLE,
.api_wavesize = api_wavesize,
.real_wavesize = real_wavesize,
},
&stream_output);