<div dir="auto"><div class="gmail_extra" dir="auto"><div class="gmail_quote">On Jan 30, 2017 4:15 AM, "Lionel Landwerlin" <<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a><wbr>> wrote:<br type="attribution"><blockquote class="m_3356346305389494993quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_3356346305389494993quoted-text">On 27/01/17 09:57, Juan A. Suarez Romero wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Fri, 2017-01-27 at 09:46 +0000, Lionel Landwerlin wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But what the test does is calling OpSpecConstantOp[2], which is the<br>
operation we are patching here.<br>
<br>
And according to the spec, "all Operands must be the <id>s of other<br>
constant instructions", being constant instructions those starting with<br>
OpConstant or OpSpec. In this regard, OpUndef is not a constant.<br>
</blockquote>
I noticed this indeed. Given that test were specifically written to test<br>
this, I thought OpVectorShuffle had priority on this rule.<br>
<br>
</blockquote>
I think that when calling OpVectorShuffle directly, OpUndef can be<br>
used, but when using through OpSpecConstantsOp, the operands are<br>
restricted to constants.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I just filed a bug against the spec to get clarification on this.<br>
</blockquote>
<br>
I was to send a fix to the test, to remove the OpUndef usage. But I<br>
think I'll wait until this is clarified. Thanks!<br>
<br>
</blockquote>
<br></div>
Just to keep you updated, I've only got one comment on the SPIRV specification issue (issue 119 btw).<br>
It seems that Undef should be allowed. Feel free to comment there if you think otherwise.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I took a look at the spec today and it certainly could stand to be more clear. I think, given that OpUndef can show up at the to of a SPIR-V shader with the constants and types that it makes sense to treat it as a constant. That said, read as written, OpUndef is not a constant and therefore disallowed. We'll see what happens on the bug but my guess is that it will probably end up getting allowed.</div><div class="gmail_extra" dir="auto"><div class="gmail_quote"><blockquote class="m_3356346305389494993quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div></div>