From 9f9f229359a7c850bd5a24945f3445e611267789 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 26 May 2016 17:06:17 -0700 Subject: [PATCH] nir/spirv: Allow pointless variable decorations on inputs SPIR-V specifies that a bunch of stuff gets applied to types. This means taht a local variable could get, for instance, an array stride. Just because it's pointless doesn't mean you'll never see it. --- src/compiler/spirv/vtn_variables.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 8abd8ee9a0f..812ac62b39a 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1050,6 +1050,8 @@ var_decoration_cb(struct vtn_builder *b, struct vtn_value *val, int member, case SpvDecorationArrayStride: case SpvDecorationGLSLShared: case SpvDecorationGLSLPacked: + break; /* These can apply to a type but we don't care about them */ + case SpvDecorationBinding: case SpvDecorationDescriptorSet: case SpvDecorationNoContraction: -- 2.30.2