diff options
author | Lionel Landwerlin <[email protected]> | 2017-01-13 16:08:28 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-01-20 23:29:48 +0000 |
commit | a259b800df1cc5e7023c4233bf04f703a4571445 (patch) | |
tree | 6f9f6a057cc323e1cea5eee16d6021ba71a916ac /src/compiler | |
parent | 45f13c2be08f014581a0099f5ce8db79ff9e2142 (diff) |
spirv: don't assert with location decorations on non i/o variables
Some applications might add location decoration to samplers. Rather
than raising an error it seems it would make more sense to just
discard these decorations.
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Cc: 17.0 <[email protected]>
(cherry picked from commit 8a28e764d0e28d0d4dfa3b81b89fa3baf30e94f2)
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 61a3701e435..61373d4e887 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1199,7 +1199,8 @@ var_decoration_cb(struct vtn_builder *b, struct vtn_value *val, int member, is_vertex_input = false; location += vtn_var->patch ? VARYING_SLOT_PATCH0 : VARYING_SLOT_VAR0; } else { - unreachable("Location must be on input or output variable"); + vtn_warn("Location must be on input or output variable"); + return; } if (vtn_var->var) { |