diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-07-19 13:55:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-19 13:55:01 -0400 |
| commit | 798db8d2bef31355c8aba5ba926556b4a297bc5f (patch) | |
| tree | c4a815e219a43cf94146fbda9484b11de9361932 /tests | |
| parent | 5b4f35b8d00661852c607a49d81c590d4050a166 (diff) | |
Yet more improvements/fixes to cpu-target.md (#2330)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Small improvements to cpu-target documentation.
* More improvements to cpu-target.md doc.
* More CPU target doc improvements.
* More improvements around cpu-target.md
* More fixes and improvements.
* Added test for behavior of actual global and reflection.
* Add category to determine cpu word size, so that reflection tests can target width.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/reflection/actual-global.slang | 12 | ||||
| -rw-r--r-- | tests/reflection/actual-global.slang.expected | 51 |
2 files changed, 63 insertions, 0 deletions
diff --git a/tests/reflection/actual-global.slang b/tests/reflection/actual-global.slang new file mode 100644 index 000000000..806b75f2f --- /dev/null +++ b/tests/reflection/actual-global.slang @@ -0,0 +1,12 @@ +//TEST(64-bit):REFLECTION:-stage compute -no-codegen -target host-callable -entry computeMain + +__global int actualGlobal; +int regularGlobal; + +RWStructuredBuffer<int> outputBuffer; + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + outputBuffer[dispatchThreadID.x] = dispatchThreadID.x + actualGlobal + regularGlobal; +}
\ No newline at end of file diff --git a/tests/reflection/actual-global.slang.expected b/tests/reflection/actual-global.slang.expected new file mode 100644 index 000000000..5dbcde22e --- /dev/null +++ b/tests/reflection/actual-global.slang.expected @@ -0,0 +1,51 @@ +result code = 0 +standard error = { +} +standard output = { +{ + "parameters": [ + { + "name": "regularGlobal", + "binding": {"kind": "uniform", "offset": 0, "size": 4}, + "type": { + "kind": "scalar", + "scalarType": "int32" + } + }, + { + "name": "outputBuffer", + "binding": {"kind": "uniform", "offset": 8, "size": 16}, + "type": { + "kind": "resource", + "baseShape": "structuredBuffer", + "access": "readWrite", + "resultType": { + "kind": "scalar", + "scalarType": "int32" + } + } + } + ], + "entryPoints": [ + { + "name": "computeMain", + "stage:": "compute", + "parameters": [ + { + "name": "dispatchThreadID", + "semanticName": "SV_DISPATCHTHREADID", + "type": { + "kind": "vector", + "elementCount": 3, + "elementType": { + "kind": "scalar", + "scalarType": "uint32" + } + } + } + ], + "threadGroupSize": [4, 1, 1] + } + ] +} +} |
