Skip to content

Instantly share code, notes, and snippets.

@kainino0x
Created January 2, 2018 00:20
Show Gist options
  • Save kainino0x/cc3d6fea9a01fbf163f9d5173f92853c to your computer and use it in GitHub Desktop.
Save kainino0x/cc3d6fea9a01fbf163f9d5173f92853c to your computer and use it in GitHub Desktop.
diff -U0 SPIRV1.1.html SPIRV1.2.html
--- SPIRV1.1.html 2018-01-01 16:07:16.000000000 -0800
+++ SPIRV1.2.html 2018-01-01 16:07:14.000000000 -0800
@@ -6 +6 @@
-<title>SPIR-V Specification Provisional</title>
+<title>SPIR-V Specification</title>
@@ -1729 +1729 @@
-<h1>SPIR-V Specification Provisional</h1>
+<h1>SPIR-V Specification</h1>
@@ -1731 +1731 @@
-<span id="revnumber">version 1.1, Revision 8</span>
+<span id="revnumber">version 1.2, Revision 2</span>
@@ -1763,0 +1764 @@
+<div class="paragraph"><p>Ben Ashbaugh, Intel</p></div>
@@ -1796,0 +1798 @@
+<div class="paragraph"><p>Bartosz Sochacki, Intel</p></div>
@@ -4486 +4488 @@
-Used by <a href="#OpExecutionMode"><strong>OpExecutionMode</strong></a>.</p></div>
+Used by <a href="#OpExecutionMode"><strong>OpExecutionMode</strong></a> and <a href="#OpExecutionModeId"><strong>OpExecutionModeId</strong></a>.</p></div>
@@ -4776,0 +4779,34 @@
+<td class="tableblock halign-center valign-top" ><p class="tableblock">37</p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>SubgroupsPerWorkgroupId</strong><br>
+Indicates that this entry point requires the specified number of <em>Subgroups Per Workgroup</em>.<br>
+<br>
+ Specified as an Id.</p></td>
+<td class="tableblock halign-center valign-top" ><p class="tableblock"><strong>SubgroupDispatch</strong></p></td>
+<td class="tableblock halign-left valign-top" colspan="3" ><p class="tableblock"><em>&lt;id&gt;</em><br>
+<em>Subgroups Per Workgroup</em></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-center valign-top" ><p class="tableblock">38</p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>LocalSizeId</strong><br>
+Indicates the work-group size in the <em>x</em>, <em>y</em>, and <em>z</em> dimensions. Only valid with the <strong>GLCompute</strong> or <strong>Kernel</strong> <a href="#Execution_Model">Execution Models</a>.<br>
+<br>
+ Specified as Ids.</p></td>
+<td class="tableblock halign-center valign-top" ><p class="tableblock"></p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>&lt;id&gt;</em><br>
+<em>x size</em></p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>&lt;id&gt;</em><br>
+<em>y size</em></p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>&lt;id&gt;</em><br>
+<em>z size</em></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-center valign-top" ><p class="tableblock">39</p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>LocalSizeHintId</strong><br>
+A hint to the compiler, which indicates the most likely to be used work-group size in the <em>x</em>, <em>y</em>, and <em>z</em> dimensions. Only valid with the <strong>Kernel</strong> <a href="#Execution_Model">Execution Model</a>.<br>
+<br>
+ Specified as an Id.</p></td>
+<td class="tableblock halign-center valign-top" ><p class="tableblock"><strong>Kernel</strong></p></td>
+<td class="tableblock halign-left valign-top" colspan="3" ><p class="tableblock"><em>&lt;id&gt;</em><br>
+<em>Local Size Hint</em></p></td>
+</tr>
+<tr>
@@ -5962 +5998 @@
-<div class="paragraph"><p>Used by <a href="#OpDecorate"><strong>OpDecorate</strong></a> and <a href="#OpMemberDecorate"><strong>OpMemberDecorate</strong></a>.</p></div>
+<div class="paragraph"><p>Used by <a href="#OpDecorate"><strong>OpDecorate</strong></a>, <a href="#OpMemberDecorate"><strong>OpMemberDecorate</strong></a>, and <a href="#OpDecorateId"><strong>OpDecorateId</strong></a>.</p></div>
@@ -6316,0 +6353,20 @@
+<td class="tableblock halign-center valign-top" ><p class="tableblock">46</p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>AlignmentId</strong><br>
+Apply to a pointer. This declares a known minimum alignment the pointer has.<br>
+<br>
+ Specified as an Id.</p></td>
+<td class="tableblock halign-center valign-top" ><p class="tableblock"><strong>Kernel</strong></p></td>
+<td class="tableblock halign-left valign-top" colspan="2" ><p class="tableblock"><em>&lt;id&gt;</em><br>
+<em>Alignment</em></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-center valign-top" ><p class="tableblock">47</p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>MaxByteOffsetId</strong><br>
+Apply to a pointer. This declares a known maximum byte offset this pointer will be incremented by from the point of the decoration. This is a guaranteed upper bound when applied to <a href="#OpFunctionParameter"><strong>OpFunctionParameter</strong></a>.<br>
+<br>
+ Specified as an Id.</p></td>
+<td class="tableblock halign-center valign-top" ><p class="tableblock"><strong>Addresses</strong></p></td>
+<td class="tableblock halign-left valign-top" colspan="2" ><p class="tableblock"><em>&lt;id&gt;</em><br>
+<em>Max Byte Offset</em></p></td>
+</tr>
+<tr>
@@ -8611 +8667,3 @@
-<em>Target</em> is the <em>&lt;id&gt;</em> to decorate. It can potentially be any <em>&lt;id&gt;</em> that is a forward reference. A set of decorations can be grouped together by having multiple <strong>OpDecorate</strong> instructions target the same <a href="#OpDecorationGroup"><strong>OpDecorationGroup</strong></a> instruction.</p></td>
+<em>Target</em> is the <em>&lt;id&gt;</em> to decorate. It can potentially be any <em>&lt;id&gt;</em> that is a forward reference. A set of decorations can be grouped together by having multiple decoration instructions targeting the same <a href="#OpDecorationGroup"><strong>OpDecorationGroup</strong></a> instruction.<br>
+<br>
+This instruction is only valid when the <em>Decoration</em> operand is a <a href="#Decoration">decoration</a> that takes no <strong>Extra Operands</strong>, or takes <strong>Extra Operands</strong> that are not <em>&lt;id&gt;</em> operands.</p></td>
@@ -8670 +8728 @@
-A collector for <a href="#Decoration">Decorations</a> from <a href="#OpDecorate"><strong>OpDecorate</strong></a> instructions. All such <strong>OpDecorate</strong> instructions targeting this <strong>OpDecorationGroup</strong> instruction must precede it. Subsequent <a href="#OpGroupDecorate"><strong>OpGroupDecorate</strong></a> and <a href="#OpGroupMemberDecorate"><strong>OpGroupMemberDecorate</strong></a> instructions that consume this instruction&#8217;s <em>Result &lt;id&gt;</em> will apply these decorations to their targets.</p></td>
+A collector for <a href="#Decoration">Decorations</a> from <a href="#OpDecorate"><strong>OpDecorate</strong></a> and <a href="#OpDecorateId"><strong>OpDecorateId</strong></a> instructions. All such decoration instructions targeting this <strong>OpDecorationGroup</strong> instruction must precede it. Subsequent <a href="#OpGroupDecorate"><strong>OpGroupDecorate</strong></a> and <a href="#OpGroupMemberDecorate"><strong>OpGroupMemberDecorate</strong></a> instructions that consume this instruction&#8217;s <em>Result &lt;id&gt;</em> will apply these decorations to their targets.</p></td>
@@ -8737,0 +8796,30 @@
+<table class="tableblock frame-all grid-all"
+style="
+width:100%;
+">
+<col style="width:23%;">
+<col style="width:7%;">
+<col style="width:23%;">
+<col style="width:23%;">
+<col style="width:23%;">
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top" colspan="5" ><p class="tableblock"><a id="OpDecorateId"></a><strong>OpDecorateId</strong><br>
+<br>
+Add a <a href="#Decoration">Decoration</a> to another <em>&lt;id&gt;</em>, using <em>&lt;id&gt;s</em> as <strong>Extra Operands</strong>.<br>
+<br>
+<em>Target</em> is the <em>&lt;id&gt;</em> to decorate. It can potentially be any <em>&lt;id&gt;</em> that is a forward reference. A set of decorations can be grouped together by having multiple decoration instructions targeting the same <a href="#OpDecorationGroup"><strong>OpDecorationGroup</strong></a> instruction.<br>
+<br>
+This instruction is only valid when the <em>Decoration</em> operand is a <a href="#Decoration">decoration</a> that takes <strong>Extra Operands</strong> that are <em>&lt;id&gt;</em> operands. All such <em>&lt;id&gt;</em> <strong>Extra Operands</strong> must be <a href="#ConstantInstruction">constant instructions</a>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top" ><p class="tableblock">3 + variable</p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock">332</p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>&lt;id&gt;</em><br>
+<em>Target</em></p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><a href="#Decoration"><em>Decoration</em></a><br></p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>&lt;id&gt;, &lt;id&gt;, &#8230;</em><br>
+See <a href="#Decoration"><em>Decoration</em></a>.</p></td>
+</tr>
+</tbody>
+</table>
@@ -8905 +8993 @@
-width:76%;
+width:100%;
@@ -8920 +9008,3 @@
-<em>Mode</em> is the execution mode. See <a href="#Execution_Mode">Execution Mode</a>.</p></td>
+<em>Mode</em> is the execution mode. See <a href="#Execution_Mode">Execution Mode</a>.<br>
+<br>
+This instruction is only valid when the <em>Mode</em> operand is an <a href="#Execution_Mode">execution mode</a> that takes no <strong>Extra Operands</strong>, or takes <strong>Extra Operands</strong> that are not <em>&lt;id&gt;</em> operands.</p></td>
@@ -8929 +9019 @@
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>Optional literal(s)</em><br>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>Literal, Literal, &#8230;</em><br>
@@ -8959,0 +9050,33 @@
+<table class="tableblock frame-all grid-all"
+style="
+width:100%;
+">
+<col style="width:23%;">
+<col style="width:7%;">
+<col style="width:23%;">
+<col style="width:23%;">
+<col style="width:23%;">
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top" colspan="5" ><p class="tableblock"><a id="OpExecutionModeId"></a><strong>OpExecutionModeId</strong><br>
+<br>
+Declare an execution mode for an entry point, using <em>&lt;id&gt;s</em> as <strong>Extra Operands</strong>.<br>
+<br>
+<em>Entry Point</em> must be the <em>Entry Point &lt;id&gt;</em> operand of an <a href="#OpEntryPoint"><strong>OpEntryPoint</strong></a> instruction.<br>
+<br>
+<em>Mode</em> is the execution mode. See <a href="#Execution_Mode">Execution Mode</a>.<br>
+<br>
+This instruction is only valid when the <em>Mode</em> operand is an <a href="#Execution_Mode">execution mode</a> that takes <strong>Extra Operands</strong> that are <em>&lt;id&gt;</em> operands. All such <em>&lt;id&gt;</em> <strong>Extra Operands</strong> must be <a href="#ConstantInstruction">constant instructions</a>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top" ><p class="tableblock">3 + variable</p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock">331</p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>&lt;id&gt;</em><br>
+<em>Entry Point</em></p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><a href="#Execution_Mode"><em>Execution Mode</em></a><br>
+<em>Mode</em></p></td>
+<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>&lt;id&gt;, &lt;id&gt;, &#8230;</em><br>
+See <a href="#Execution_Mode">Execution Mode</a></p></td>
+</tr>
+</tbody>
+</table>
@@ -14918 +15041 @@
-<em>Result Type</em> must be a scalar or vector.<br>
+<em>Result Type</em> must be a pointer, scalar, or vector.<br>
@@ -21271,0 +21395,49 @@
+<div class="sect2">
+<h3 id="_changes_from_version_1_1">4.22. Changes from Version 1.1</h3>
+<div class="ulist"><ul>
+<li>
+<p>
+Moved version number to SPIR-V 1.2
+</p>
+</li>
+<li>
+<p>
+New functionality:
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+Added <a href="#OpExecutionModeId"><strong>OpExecutionModeId</strong></a> to allow using an <em>&lt;id&gt;</em> to set the
+ <a href="#Execution_Mode">execution modes</a> <strong>SubgroupsPerWorkgroupId</strong>, <strong>LocalSizeId</strong>, and <strong>LocalSizeHintId</strong>.
+</p>
+</li>
+<li>
+<p>
+Added <a href="#OpDecorateId"><strong>OpDecorateId</strong></a> to allow using an <em>&lt;id&gt;</em> to set the
+ <a href="#Decoration">decorations</a> <strong>AlignmentId</strong> and <strong>MaxByteOffsetId</strong>.
+</p>
+</li>
+</ul></div>
+</li>
+<li>
+<p>
+Khronos issue #140: Allow <a href="#OpSelect"><strong>OpSelect</strong></a> to select between pointers.
+</p>
+</li>
+</ul></div>
+</div>
+<div class="sect2">
+<h3 id="_changes_from_version_1_2_revision_1">4.23. Changes from Version 1.2, Revision 1</h3>
+<div class="ulist"><ul>
+<li>
+<p>
+Incorporated changes from Revision 12 of Version 1.00 (see section 4.13. Changes from Version 1.00, Revision 11).
+</p>
+</li>
+<li>
+<p>
+Incorporated changes from Revision 8 of Version 1.1 (see section 4.21. Changes from Version 1.1, Revision 7).
+</p>
+</li>
+</ul></div>
+</div>
@@ -21278 +21450 @@
-Version 1.1, Revision 8<br>
+Version 1.2, Revision 2<br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment