diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-03-27 12:25:43 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-27 12:25:43 -0400 |
| commit | c9930ea56ce0d3d9783d4d2482edb91cb765109e (patch) | |
| tree | 42bc3b4d44771d1c1bca389f20b9321793d268e1 /tests/compute/half-texture.slang.1.expected | |
| parent | 047adbd4dd3dd6e3098adcb63a8ac475ae06d20d (diff) | |
GLSL half texture access (#931)
* * Added $c macro - that will do casting to target type. Used here to cast texture reads back to half. Works in tandem with $z which will close parens.
* half-texture.slang test
* Make binding failing if TextureView fails
* Simplify logic around parens.
* Improve comment around $c macro.
* Test against hlsl output to avoid error on CI.
Diffstat (limited to 'tests/compute/half-texture.slang.1.expected')
| -rw-r--r-- | tests/compute/half-texture.slang.1.expected | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/compute/half-texture.slang.1.expected b/tests/compute/half-texture.slang.1.expected new file mode 100644 index 000000000..5d3f84e74 --- /dev/null +++ b/tests/compute/half-texture.slang.1.expected @@ -0,0 +1,51 @@ +result code = 0 +standard error = { +} +standard output = { +#pragma pack_matrix(column_major) + +#line 18 "tests/compute/half-texture.slang" +RWTexture2D<half > halfTexture_0 : register(u1); + + +#line 30 +RWTexture2D<vector<half,2> > halfTexture2_0 : register(u2); + + +#line 31 +RWTexture2D<vector<half,4> > halfTexture4_0 : register(u3); + + +#line 40 +RWStructuredBuffer<int > outputBuffer_0 : register(u0); + + +#line 18 +[shader("compute")][numthreads(4, 4, 1)] +void computeMain(vector<uint,3> dispatchThreadID_0 : SV_DISPATCHTHREADID) +{ + +#line 20 + vector<int,2> pos_0 = (vector<int,2>) dispatchThreadID_0.xy; + float _S1 = 1.00000000000000000000 / 3.00000000000000000000; + vector<int,2> pos2_0 = vector<int,2>(3 - pos_0.y, 3 - pos_0.x); + +#line 29 + half h_0 = halfTexture_0[(vector<uint,2>) pos2_0]; + vector<half,2> h2_0 = halfTexture2_0[(vector<uint,2>) pos2_0]; + vector<half,4> h4_0 = halfTexture4_0[(vector<uint,2>) pos2_0]; + + + + halfTexture_0[(vector<uint,2>) pos_0] = h2_0.x + h2_0.y; + halfTexture2_0[(vector<uint,2>) pos_0] = h4_0.xy; + halfTexture4_0[(vector<uint,2>) pos_0] = vector<half,4>(h2_0, h_0, h_0); + + int index_0 = pos_0.x + pos_0.y * 4; + outputBuffer_0[(uint) index_0] = index_0; + +#line 18 + return; +} + +} |
