summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-09-13 00:27:13 -0700
committerGitHub <noreply@github.com>2021-09-13 00:27:13 -0700
commit579df478de078f0a22f72f499c13ce442b4cd290 (patch)
tree11307366f454449e101c31b30492010aeb9ad7ed /tests
parent27ce5eb0de9f792f3e433bcb239c07d79371cf45 (diff)
Bug fix in 16bit type emit, vk validation error fix. (#1936)
+ Implement bit_cast between float16 and uint16 in GLSL. + Enable pack-any-value-16bit test on vk. Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/compute/half-texture.slang.1.expected14
-rw-r--r--tests/compute/pack-any-value-16bit.slang5
2 files changed, 9 insertions, 10 deletions
diff --git a/tests/compute/half-texture.slang.1.expected b/tests/compute/half-texture.slang.1.expected
index cd1f1e4f7..7dd96403f 100644
--- a/tests/compute/half-texture.slang.1.expected
+++ b/tests/compute/half-texture.slang.1.expected
@@ -5,11 +5,11 @@ standard output = {
#pragma pack_matrix(column_major)
#line 8 "tests/compute/half-texture.slang"
-RWTexture2D<min16float > halfTexture_0 : register(u1);
+RWTexture2D<half > halfTexture_0 : register(u1);
-RWTexture2D<vector<min16float,2> > halfTexture2_0 : register(u2);
+RWTexture2D<vector<half,2> > halfTexture2_0 : register(u2);
-RWTexture2D<vector<min16float,4> > halfTexture4_0 : register(u3);
+RWTexture2D<vector<half,4> > halfTexture4_0 : register(u3);
#line 5
@@ -27,15 +27,15 @@ void computeMain(vector<uint,3> dispatchThreadID_0 : SV_DISPATCHTHREADID)
vector<int,2> pos2_0 = vector<int,2>(int(3) - pos_0.y, int(3) - pos_0.x);
#line 29
- min16float h_0 = halfTexture_0[(vector<uint,2>) pos2_0];
- vector<min16float,2> h2_0 = halfTexture2_0[(vector<uint,2>) pos2_0];
- vector<min16float,4> h4_0 = halfTexture4_0[(vector<uint,2>) pos2_0];
+ 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<min16float,4>(h2_0, h_0, h_0);
+ 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 * int(4);
outputBuffer_0[(uint) index_0] = index_0;
diff --git a/tests/compute/pack-any-value-16bit.slang b/tests/compute/pack-any-value-16bit.slang
index b4f41bb94..1a7c96a16 100644
--- a/tests/compute/pack-any-value-16bit.slang
+++ b/tests/compute/pack-any-value-16bit.slang
@@ -1,9 +1,8 @@
// Test anyvalue packing of 16bit types.
-//TEST_DISABLED(compute):COMPARE_COMPUTE_EX:-slang -compute -vk -output-using-type
//TEST_DISABLED(compute):COMPARE_COMPUTE_EX:-slang -compute -cuda -output-using-type
-//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -profile sm_6_0 -use-dxil -output-using-type
-//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx11 -profile sm_5_0 -output-using-type
+//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -output-using-type -render-feature int16,half
+//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -profile sm_6_2 -use-dxil -output-using-type
[anyValueSize(32)]
interface IInterface