spirv: Trivially handle the NonWriteable decoration
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 20 Apr 2016 17:32:59 +0000 (10:32 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 20 Apr 2016 17:33:23 +0000 (10:33 -0700)
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_variables.c

index 99514b49650344018a9a65c8c214fdb2d3a3d044..8d4f771364fc14cac3bf65d903b82f71c1cfda62 100644 (file)
@@ -454,6 +454,7 @@ struct_member_decoration_cb(struct vtn_builder *b,
    assert(member < ctx->num_fields);
 
    switch (dec->decoration) {
+   case SpvDecorationNonWritable:
    case SpvDecorationRelaxedPrecision:
       break; /* FIXME: Do nothing with this for now. */
    case SpvDecorationNoPerspective:
index 3cbac1e5da860766f2613ed00d3d2f6f279f5cfe..3b495b2332c4574ab8d172ffb88cb5dadd49156c 100644 (file)
@@ -895,6 +895,9 @@ var_decoration_cb(struct vtn_builder *b, struct vtn_value *val, int member,
 
    /* Handle decorations that apply to a vtn_variable as a whole */
    switch (dec->decoration) {
+   case SpvDecorationNonWritable:
+      /* Do nothing with this for now */
+      return;
    case SpvDecorationBinding:
       vtn_var->binding = dec->literals[0];
       return;