From 94e0091190f3c01f3277f3224cda9277e6727ea6 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Thu, 8 Feb 2024 09:07:13 -0800 Subject: [PATCH] microsoft/compiler: Only use simplified subgroup ID algorithm for compute Part-of: --- src/microsoft/compiler/dxil_nir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/microsoft/compiler/dxil_nir.c b/src/microsoft/compiler/dxil_nir.c index 987e887d80f..dbefc910199 100644 --- a/src/microsoft/compiler/dxil_nir.c +++ b/src/microsoft/compiler/dxil_nir.c @@ -1931,7 +1931,8 @@ lower_subgroup_id(nir_builder *b, nir_intrinsic_instr *intr, void *data) return false; b->cursor = nir_before_impl(b->impl); - if (b->shader->info.workgroup_size[1] == 1 && + if (b->shader->info.stage == MESA_SHADER_COMPUTE && + b->shader->info.workgroup_size[1] == 1 && b->shader->info.workgroup_size[2] == 1) { /* When using Nx1x1 groups, use a simple stable algorithm * which is almost guaranteed to be correct. */