summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2017-01-13 16:08:28 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2017-03-13 18:43:09 +0000
commit83cf2d72f7fe18f17dc3bdf20bb6c58e0dc23b86 (patch)
tree94278a32f681eea248ea3dc60e2b10a3f0b7535e /src
parentb6ec9c2098ed96cffcc8fd4f7dbfe66fe36057f3 (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 <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Cc: 17.0 <mesa-stable@lists.freedesktop.org> (cherry picked from commit 8a28e764d0e28d0d4dfa3b81b89fa3baf30e94f2)
Diffstat (limited to 'src')
-rw-r--r--src/compiler/spirv/vtn_variables.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index 4144af6b7b3..60977e329d7 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1058,7 +1058,8 @@ var_decoration_cb(struct vtn_builder *b, struct vtn_value *val, int member,
is_vertex_input = false;
location += 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) {