From 189044298237d38856daf92389248c4f14c70759 Mon Sep 17 00:00:00 2001 From: Jacob Hughes Date: Sun, 1 Oct 2023 20:08:30 -0400 Subject: [PATCH] subgroup: SubgroupInvocationId is only valid in compute stages --- src/valid/interface.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/valid/interface.rs b/src/valid/interface.rs index 67260fe71c..cb85d2901c 100644 --- a/src/valid/interface.rs +++ b/src/valid/interface.rs @@ -299,7 +299,15 @@ impl VaryingContext<'_> { width, }, ), - Bi::SubgroupInvocationId | Bi::SubgroupSize => ( + Bi::SubgroupInvocationId => ( + self.stage == St::Compute && !self.output, + *ty_inner + == Ti::Scalar { + kind: Sk::Uint, + width, + }, + ), + Bi::SubgroupSize => ( match self.stage { St::Compute | St::Fragment => !self.output, St::Vertex => false,