<div dir="ltr"><div>I think it would be better to squash 5 and 6.  With that,</div><div><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 20, 2018 at 8:08 AM Alejandro Piñeiro <<a href="mailto:apinheiro@igalia.com">apinheiro@igalia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">>From SPIR-V 1.0 spec, section 3.20, "Decoration":<br>
<br>
   "Stream<br>
    Apply to an object or a member of a structure type. Indicates the<br>
    stream number to put an output on."<br>
<br>
Note the "or", so that means that it is allowed for both a full struct<br>
or a membef or a struct (although the wording is not really ideal, and<br>
somewhat error-prone, imho).<br>
<br>
We found this with some Geometry Streams tests for ARB_gl_spirv, where<br>
the full gl_PerVertex is assigned Stream 0 (default value on OpenGL<br>
for gl_PerVertex).<br>
---<br>
 src/compiler/spirv/spirv_to_nir.c | 9 ++++++++-<br>
 1 file changed, 8 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c<br>
index f9abd48261e..238298a8340 100644<br>
--- a/src/compiler/spirv/spirv_to_nir.c<br>
+++ b/src/compiler/spirv/spirv_to_nir.c<br>
@@ -847,7 +847,6 @@ type_decoration_cb(struct vtn_builder *b,<br>
    case SpvDecorationNonWritable:<br>
    case SpvDecorationNonReadable:<br>
    case SpvDecorationUniform:<br>
-   case SpvDecorationStream:<br>
    case SpvDecorationLocation:<br>
    case SpvDecorationComponent:<br>
    case SpvDecorationOffset:<br>
@@ -857,6 +856,14 @@ type_decoration_cb(struct vtn_builder *b,<br>
                spirv_decoration_to_string(dec->decoration));<br>
       break;<br>
<br>
+   case SpvDecorationStream:<br>
+      /* We don't need to do anything here, as stream is filled up when<br>
+       * aplying the decoration to a variable, just check that if it is not a<br>
+       * struct member, it should be a struct.<br>
+       */<br>
+      vtn_assert(type->base_type == vtn_base_type_struct);<br>
+      break;<br>
+<br>
    case SpvDecorationRelaxedPrecision:<br>
    case SpvDecorationSpecId:<br>
    case SpvDecorationInvariant:<br>
-- <br>
2.14.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>