aboutsummaryrefslogtreecommitdiff
path: root/syntax.md
diff options
context:
space:
mode:
authorAndrew Woloszyn <awoloszyn@google.com>2015-09-22 15:50:33 -0400
committerDavid Neto <dneto@google.com>2015-10-26 12:55:33 -0400
commit13804e5d63acab8b0cd29a81e0a94a96ec0c8f85 (patch)
treede387412d218208475604b8c3cde9e4d1c10b006 /syntax.md
parenta66952d38c99add8cbe82ced879fbdb293f9f994 (diff)
downloadspirv-tools-13804e5d63acab8b0cd29a81e0a94a96ec0c8f85.tar.gz
All values now represent symbolic names instead of mixed with numeric.
Also removed un-necessary heap-allocation of spv_named_id_table. This removed the necessity to expose a function to create/destroy it and simplified the interface.
Diffstat (limited to 'syntax.md')
-rw-r--r--syntax.md14
1 files changed, 8 insertions, 6 deletions
diff --git a/syntax.md b/syntax.md
index f36849ae..2bc3e69f 100644
--- a/syntax.md
+++ b/syntax.md
@@ -75,12 +75,12 @@ An ID definition pertains to the `<result-id>` of an OpCode, and ID usage is any
input to an OpCode. All IDs are prefixed with `%`. To differentiate between
defs and uses, we suggest using the second format shown in the above example.
-## Named IDs
-
-The assembler also supports named IDs, or virtual IDs, which greatly improves
-the readability of the assembly. The same ID definition and usage prefixes
-apply. Names must begin with an character in the range `[a-z|A-Z]`. The
-following example will result in identical SPIR-V binary as the example above.
+The ID names do not necessarily have to be numerical. Furthermore to avoid
+aliasing names, if a name is numerical, it will not necessarily map to the
+corresponding numerical id in the generated spirv. The same ID definition and
+usage prefixes apply. Names may contain any character in
+['0-9|a-z|A-Z|\_'] The following example will result in identical SPIR-V binary
+as the example above.
```
OpCapability Shader
@@ -95,6 +95,8 @@ following example will result in identical SPIR-V binary as the example above.
OpFunctionEnd
```
+
+
## Arbitrary Integers
<a name="immediate"></a>