From 39c4585e42153151eb7034839c45a13a9b53d3d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20W=C3=A5linder?= Date: Mon, 3 Nov 2025 05:26:25 +0100 Subject: [PATCH] Stop FIR from generating vectors of vectors, so that operators like `!+!` and `!-!` work --- src/SPIRV/PrimTy.hs | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/SPIRV/PrimTy.hs b/src/SPIRV/PrimTy.hs index a2d5ffd..431561e 100644 --- a/src/SPIRV/PrimTy.hs +++ b/src/SPIRV/PrimTy.hs @@ -105,22 +105,23 @@ pattern PointerTy storage ty = PtrTy (Pointer storage ty) tyOp :: PrimTy -> Operation -tyOp Unit = TypeVoid -tyOp Boolean = TypeBool -tyOp (Scalar Integer {}) = TypeInt -tyOp (Scalar Floating {}) = TypeFloat -tyOp Vector {} = TypeVector -tyOp Matrix {} = TypeMatrix -tyOp Array {} = TypeArray -tyOp RuntimeArray {} = TypeRuntimeArray -tyOp Struct {} = TypeStruct -tyOp Function {} = TypeFunction -tyOp Pointer {} = TypePointer -tyOp Image {} = TypeImage -tyOp Sampler = TypeSampler -tyOp SampledImage {} = TypeSampledImage -tyOp AccelerationStructure = TypeAccelerationStructure -tyOp RayQuery = TypeRayQuery +tyOp Unit = TypeVoid +tyOp Boolean = TypeBool +tyOp (Scalar Integer {}) = TypeInt +tyOp (Scalar Floating {}) = TypeFloat +tyOp (Vector _ (Vector _ _)) = TypeMatrix +tyOp Vector {} = TypeVector +tyOp Matrix {} = TypeMatrix +tyOp Array {} = TypeArray +tyOp RuntimeArray {} = TypeRuntimeArray +tyOp Struct {} = TypeStruct +tyOp Function {} = TypeFunction +tyOp Pointer {} = TypePointer +tyOp Image {} = TypeImage +tyOp Sampler = TypeSampler +tyOp SampledImage {} = TypeSampledImage +tyOp AccelerationStructure = TypeAccelerationStructure +tyOp RayQuery = TypeRayQuery scalars :: PrimTy -> [ ScalarTy ] scalars Unit = [ ] -- GitLab