diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-02-14 08:27:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-14 08:27:46 -0500 |
| commit | b059de80b7619e4406dbddf26fd7f2fb7ce6a965 (patch) | |
| tree | aee9bf78c48d57a86a6689d347e08561c78fdaaf /source | |
| parent | 4133192e7d390fb14465fc1ce45a1337b33927b7 (diff) | |
* Add cross compile test (#849)
* Add intrinsic for StructuredBuffer.Load
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/hlsl.meta.slang | 1 | ||||
| -rw-r--r-- | source/slang/hlsl.meta.slang.h | 1 | ||||
| -rw-r--r-- | source/slang/parser.cpp | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang index 4831e6ce2..fc02395d4 100644 --- a/source/slang/hlsl.meta.slang +++ b/source/slang/hlsl.meta.slang @@ -52,6 +52,7 @@ struct StructuredBuffer out uint numStructs, out uint stride); + __target_intrinsic(glsl, "$0._data[$1]") T Load(int location); T Load(int location, out uint status); diff --git a/source/slang/hlsl.meta.slang.h b/source/slang/hlsl.meta.slang.h index ef1a6d273..1dcf55f2a 100644 --- a/source/slang/hlsl.meta.slang.h +++ b/source/slang/hlsl.meta.slang.h @@ -61,6 +61,7 @@ SLANG_RAW(" void GetDimensions(\n") SLANG_RAW(" out uint numStructs,\n") SLANG_RAW(" out uint stride);\n") SLANG_RAW("\n") +SLANG_RAW(" __target_intrinsic(glsl, \"$0._data[$1]\") \n") SLANG_RAW(" T Load(int location);\n") SLANG_RAW(" T Load(int location, out uint status);\n") SLANG_RAW("\n") diff --git a/source/slang/parser.cpp b/source/slang/parser.cpp index 38a28745a..e2085eb7d 100644 --- a/source/slang/parser.cpp +++ b/source/slang/parser.cpp @@ -4520,7 +4520,7 @@ namespace Slang // __intrinsic_op(<identifier>) // // Finally, we can leave off the specification, so that the - // op name will be derived fromthe function name: + // op name will be derived from the function name: // // __intrinsic_op // |
