summaryrefslogtreecommitdiff
path: root/tests/ir/string-literal-hash-reflection.slang.expected
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-12-03 09:58:59 -0500
committerGitHub <noreply@github.com>2019-12-03 09:58:59 -0500
commit9653dcc2c9d5d20d3d0e8918aaf1d5b09e963060 (patch)
treeaa1b42132361b2920d9f9301f0b0e44ea82d6b8c /tests/ir/string-literal-hash-reflection.slang.expected
parenta3651d99fb8f3a046365d60751d1f3f806e48f7a (diff)
getStringHash on string literals (#1140)
* WIP getStringHash * Have a use. * Add slang-string-hash.h/.cpp * Use StringSlicePool for holding strings for StringHash. Add outputBuffer to string-literal-hash.slang so value can be tested. Ignore the GlobalHashedStringLiterals instruction on emit. * Add all the hashed string literals to ProgramLayout. * Add reflection support for hashed string literals to reflection test. * Fix string literal hash test. * Small fixes to pass test suite. * Fix issue in serialization where IRUse is not correctly initialized. * Fix problem initializing IRUse for string hash pass. Remove hack from slang-ir-specialize - specially handling if user is not null. * * Use shared builder when replacing getStringHash * Comments for functions in slang-ir-string-hash * Do not allow zero length string literals. Could be allowed, but doing so would require StringSlicePool to have a special case (or some other mechanism)
Diffstat (limited to 'tests/ir/string-literal-hash-reflection.slang.expected')
-rw-r--r--tests/ir/string-literal-hash-reflection.slang.expected44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/ir/string-literal-hash-reflection.slang.expected b/tests/ir/string-literal-hash-reflection.slang.expected
new file mode 100644
index 000000000..4b3726efe
--- /dev/null
+++ b/tests/ir/string-literal-hash-reflection.slang.expected
@@ -0,0 +1,44 @@
+result code = 0
+standard error = {
+}
+standard output = {
+{
+ "parameters": [
+ {
+ "name": "outputBuffer",
+ "binding": {"kind": "unorderedAccess", "index": 0},
+ "type": {
+ "kind": "resource",
+ "baseShape": "structuredBuffer",
+ "access": "readWrite",
+ "resultType": {
+ "kind": "scalar",
+ "scalarType": "int32"
+ }
+ }
+ }
+ ],
+ "entryPoints": [
+ {
+ "name": "computeMain",
+ "stage:": "compute",
+ "parameters": [
+ {
+ "name": "tid",
+ "semanticName": "SV_DISPATCHTHREADINDEX",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "uint32"
+ }
+ }
+ ],
+ "threadGroupSize": [4, 1, 1]
+ }
+ ],
+ "hashedStrings": {
+ "Hello \t\n\0x083 World": -215446506,
+ "Try another": 900483678
+ }
+
+}
+}