diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2025-01-30 13:19:13 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-30 13:19:13 -0800 |
| commit | fb052bf4674b55933e6dd9f991c99000c049d216 (patch) | |
| tree | cff94fc924a63fe80ae53cc3a0c15039c171bf7a | |
| parent | 7a8131d312d84f71b1c8776ad83713dea52301f4 (diff) | |
Support cooperative vector including Vulkan-Header (#6228)
* Support cooperative vector including Vulkan-Header
Adding a Slang support for cooperative vector with vulkan-header update.
44 files changed, 59 insertions, 25 deletions
diff --git a/external/slang-rhi b/external/slang-rhi -Subproject d1f2718165d0d540c8fc1eacf20b9edd2d6faac +Subproject 694bf27ce2f7e1ee2128ee30c8824c8094b6901 diff --git a/external/vulkan b/external/vulkan -Subproject f864bc6dfe6229a399566e979c16795386d0f30 +Subproject 39f924b810e561fd86b2558b6711ca68d4363f6 diff --git a/tests/cooperative-vector/CoopVec/add.slang b/tests/cooperative-vector/CoopVec/add.slang index 082d19468..e25cd5449 100644 --- a/tests/cooperative-vector/CoopVec/add.slang +++ b/tests/cooperative-vector/CoopVec/add.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/atan.slang b/tests/cooperative-vector/CoopVec/atan.slang index 1dfd62986..37c0d7233 100644 --- a/tests/cooperative-vector/CoopVec/atan.slang +++ b/tests/cooperative-vector/CoopVec/atan.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/clamp.slang b/tests/cooperative-vector/CoopVec/clamp.slang index b5639eeb4..648223907 100644 --- a/tests/cooperative-vector/CoopVec/clamp.slang +++ b/tests/cooperative-vector/CoopVec/clamp.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/comparison.slang b/tests/cooperative-vector/CoopVec/comparison.slang index b410176bc..44f60c344 100644 --- a/tests/cooperative-vector/CoopVec/comparison.slang +++ b/tests/cooperative-vector/CoopVec/comparison.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/conversion.slang b/tests/cooperative-vector/CoopVec/conversion.slang index 02d125f58..a9436b31e 100644 --- a/tests/cooperative-vector/CoopVec/conversion.slang +++ b/tests/cooperative-vector/CoopVec/conversion.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/copyFrom.slang b/tests/cooperative-vector/CoopVec/copyFrom.slang index eb8697d33..da6e77d1f 100644 --- a/tests/cooperative-vector/CoopVec/copyFrom.slang +++ b/tests/cooperative-vector/CoopVec/copyFrom.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/div.slang b/tests/cooperative-vector/CoopVec/div.slang index 6708a54f1..43773c7bc 100644 --- a/tests/cooperative-vector/CoopVec/div.slang +++ b/tests/cooperative-vector/CoopVec/div.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/exp.slang b/tests/cooperative-vector/CoopVec/exp.slang index f2d3fe716..eda6e1c3e 100644 --- a/tests/cooperative-vector/CoopVec/exp.slang +++ b/tests/cooperative-vector/CoopVec/exp.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/fill.slang b/tests/cooperative-vector/CoopVec/fill.slang index fe36b4ed6..6cd37ba7d 100644 --- a/tests/cooperative-vector/CoopVec/fill.slang +++ b/tests/cooperative-vector/CoopVec/fill.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/fma.slang b/tests/cooperative-vector/CoopVec/fma.slang index 434cdef32..9a5c5311d 100644 --- a/tests/cooperative-vector/CoopVec/fma.slang +++ b/tests/cooperative-vector/CoopVec/fma.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/log.slang b/tests/cooperative-vector/CoopVec/log.slang index 6428799d1..c68696706 100644 --- a/tests/cooperative-vector/CoopVec/log.slang +++ b/tests/cooperative-vector/CoopVec/log.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed-mut.slang b/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed-mut.slang index fdb10703c..307c4473c 100644 --- a/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed-mut.slang +++ b/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed-mut.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed.slang b/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed.slang index 325a106af..200fa9163 100644 --- a/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed.slang +++ b/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/max.slang b/tests/cooperative-vector/CoopVec/max.slang index 3b18f7782..829c1628d 100644 --- a/tests/cooperative-vector/CoopVec/max.slang +++ b/tests/cooperative-vector/CoopVec/max.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/min.slang b/tests/cooperative-vector/CoopVec/min.slang index ed4e5e7aa..4a5c45deb 100644 --- a/tests/cooperative-vector/CoopVec/min.slang +++ b/tests/cooperative-vector/CoopVec/min.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/mod.slang b/tests/cooperative-vector/CoopVec/mod.slang index a25516d1a..bc55eecab 100644 --- a/tests/cooperative-vector/CoopVec/mod.slang +++ b/tests/cooperative-vector/CoopVec/mod.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -xslang -skip-spirv-validation -emit-spirv-directly //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu diff --git a/tests/cooperative-vector/CoopVec/mul.slang b/tests/cooperative-vector/CoopVec/mul.slang index 232421c0d..ba01c224b 100644 --- a/tests/cooperative-vector/CoopVec/mul.slang +++ b/tests/cooperative-vector/CoopVec/mul.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/scalar-mul.slang b/tests/cooperative-vector/CoopVec/scalar-mul.slang index b15654be2..03574425c 100644 --- a/tests/cooperative-vector/CoopVec/scalar-mul.slang +++ b/tests/cooperative-vector/CoopVec/scalar-mul.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/simple.slang b/tests/cooperative-vector/CoopVec/simple.slang index 3b65b7c8c..9450840bc 100644 --- a/tests/cooperative-vector/CoopVec/simple.slang +++ b/tests/cooperative-vector/CoopVec/simple.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/step.slang b/tests/cooperative-vector/CoopVec/step.slang index cfa86df28..cf428f40e 100644 --- a/tests/cooperative-vector/CoopVec/step.slang +++ b/tests/cooperative-vector/CoopVec/step.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/sub.slang b/tests/cooperative-vector/CoopVec/sub.slang index ffb4944ed..c94881c34 100644 --- a/tests/cooperative-vector/CoopVec/sub.slang +++ b/tests/cooperative-vector/CoopVec/sub.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/subscript.slang b/tests/cooperative-vector/CoopVec/subscript.slang index c4df93e72..fee3df54e 100644 --- a/tests/cooperative-vector/CoopVec/subscript.slang +++ b/tests/cooperative-vector/CoopVec/subscript.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -emit-spirv-directly //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/tanh.slang b/tests/cooperative-vector/CoopVec/tanh.slang index ed698df6b..27c547bbf 100644 --- a/tests/cooperative-vector/CoopVec/tanh.slang +++ b/tests/cooperative-vector/CoopVec/tanh.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/unary.slang b/tests/cooperative-vector/CoopVec/unary.slang index 1f577afff..cf4f95342 100644 --- a/tests/cooperative-vector/CoopVec/unary.slang +++ b/tests/cooperative-vector/CoopVec/unary.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -xslang -skip-spirv-validation //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/CoopVec/variadic-init-cast.slang b/tests/cooperative-vector/CoopVec/variadic-init-cast.slang index 36af7bcd7..888568ba1 100644 --- a/tests/cooperative-vector/CoopVec/variadic-init-cast.slang +++ b/tests/cooperative-vector/CoopVec/variadic-init-cast.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/cast.slang b/tests/cooperative-vector/glsl/cast.slang index 263ad5026..263ad5026 100644 --- a/tests/cooperative-vector/cast.slang +++ b/tests/cooperative-vector/glsl/cast.slang diff --git a/tests/cooperative-vector/cast.slang.glsl b/tests/cooperative-vector/glsl/cast.slang.glsl index 7194c02fc..7194c02fc 100644 --- a/tests/cooperative-vector/cast.slang.glsl +++ b/tests/cooperative-vector/glsl/cast.slang.glsl diff --git a/tests/cooperative-vector/groupshared-sized.slang b/tests/cooperative-vector/glsl/groupshared-sized.slang index 74ccac6a2..74ccac6a2 100644 --- a/tests/cooperative-vector/groupshared-sized.slang +++ b/tests/cooperative-vector/glsl/groupshared-sized.slang diff --git a/tests/cooperative-vector/groupshared-sized.slang.glsl b/tests/cooperative-vector/glsl/groupshared-sized.slang.glsl index f1f4b5a27..f1f4b5a27 100644 --- a/tests/cooperative-vector/groupshared-sized.slang.glsl +++ b/tests/cooperative-vector/glsl/groupshared-sized.slang.glsl diff --git a/tests/cooperative-vector/load-store.slang b/tests/cooperative-vector/glsl/load-store.slang index 04a0cd585..04a0cd585 100644 --- a/tests/cooperative-vector/load-store.slang +++ b/tests/cooperative-vector/glsl/load-store.slang diff --git a/tests/cooperative-vector/load-store.slang.glsl b/tests/cooperative-vector/glsl/load-store.slang.glsl index 3844e2ff0..3844e2ff0 100644 --- a/tests/cooperative-vector/load-store.slang.glsl +++ b/tests/cooperative-vector/glsl/load-store.slang.glsl diff --git a/tests/cooperative-vector/only-arith.slang b/tests/cooperative-vector/glsl/only-arith.slang index 8a6d3d0d9..8a6d3d0d9 100644 --- a/tests/cooperative-vector/only-arith.slang +++ b/tests/cooperative-vector/glsl/only-arith.slang diff --git a/tests/cooperative-vector/only-arith.slang.glsl b/tests/cooperative-vector/glsl/only-arith.slang.glsl index db3372d70..db3372d70 100644 --- a/tests/cooperative-vector/only-arith.slang.glsl +++ b/tests/cooperative-vector/glsl/only-arith.slang.glsl diff --git a/tests/cooperative-vector/outer-product-accumulate.slang b/tests/cooperative-vector/glsl/outer-product-accumulate.slang index 1db30cb0d..1db30cb0d 100644 --- a/tests/cooperative-vector/outer-product-accumulate.slang +++ b/tests/cooperative-vector/glsl/outer-product-accumulate.slang diff --git a/tests/cooperative-vector/outer-product-accumulate.slang.glsl b/tests/cooperative-vector/glsl/outer-product-accumulate.slang.glsl index 09d781824..09d781824 100644 --- a/tests/cooperative-vector/outer-product-accumulate.slang.glsl +++ b/tests/cooperative-vector/glsl/outer-product-accumulate.slang.glsl diff --git a/tests/cooperative-vector/simple.slang b/tests/cooperative-vector/glsl/simple.slang index 4128f6827..4128f6827 100644 --- a/tests/cooperative-vector/simple.slang +++ b/tests/cooperative-vector/glsl/simple.slang diff --git a/tests/cooperative-vector/simple.slang.glsl b/tests/cooperative-vector/glsl/simple.slang.glsl index cf5f0566e..cf5f0566e 100644 --- a/tests/cooperative-vector/simple.slang.glsl +++ b/tests/cooperative-vector/glsl/simple.slang.glsl diff --git a/tests/expected-failure-github.txt b/tests/expected-failure-github.txt index e7298312b..6bf4f041d 100644 --- a/tests/expected-failure-github.txt +++ b/tests/expected-failure-github.txt @@ -15,3 +15,4 @@ tests/compute/interface-shader-param.slang.5 syn (wgpu) tests/language-feature/shader-params/interface-shader-param-ordinary.slang.4 syn (wgpu) gfx-unit-test-tool/RayTracingTestAD3D12.internal gfx-unit-test-tool/RayTracingTestBD3D12.internal +gfx-unit-test-tool/precompiledTargetModule2Vulkan.internal diff --git a/tests/expected-failure.txt b/tests/expected-failure.txt index 7283c8d97..2d95734cc 100644 --- a/tests/expected-failure.txt +++ b/tests/expected-failure.txt @@ -5,3 +5,4 @@ tests/language-feature/saturated-cooperation/fuse.slang (vk) tests/bugs/byte-address-buffer-interlocked-add-f32.slang (vk) tests/ir/loop-unroll-0.slang.1 (vk) tests/hlsl-intrinsic/texture/float-atomics.slang (vk) +gfx-unit-test-tool/precompiledTargetModule2Vulkan.internal diff --git a/tools/gfx/vulkan/vk-api.cpp b/tools/gfx/vulkan/vk-api.cpp index dbf32345f..09b8e92f5 100644 --- a/tools/gfx/vulkan/vk-api.cpp +++ b/tools/gfx/vulkan/vk-api.cpp @@ -86,6 +86,17 @@ Slang::Result VulkanApi::initPhysicalDevice(VkPhysicalDevice physicalDevice) vkGetPhysicalDeviceFeatures(m_physicalDevice, &m_deviceFeatures); vkGetPhysicalDeviceMemoryProperties(m_physicalDevice, &m_deviceMemoryProperties); + if (vkGetPhysicalDeviceCooperativeVectorPropertiesNV) + { + uint32_t nProps = 0; + vkGetPhysicalDeviceCooperativeVectorPropertiesNV(m_physicalDevice, &nProps, nullptr); + m_cooperativeVectorProperties.setCount(nProps); + vkGetPhysicalDeviceCooperativeVectorPropertiesNV( + m_physicalDevice, + &nProps, + m_cooperativeVectorProperties.getBuffer()); + } + return SLANG_OK; } diff --git a/tools/gfx/vulkan/vk-api.h b/tools/gfx/vulkan/vk-api.h index 23902e88c..41fede15e 100644 --- a/tools/gfx/vulkan/vk-api.h +++ b/tools/gfx/vulkan/vk-api.h @@ -22,6 +22,7 @@ namespace gfx x(vkCreateDebugReportCallbackEXT) \ x(vkDestroyDebugReportCallbackEXT) \ x(vkDebugReportMessageEXT) \ + x(vkGetPhysicalDeviceCooperativeVectorPropertiesNV) \ /* */ #define VK_API_INSTANCE_PROCS(x) \ @@ -304,6 +305,10 @@ struct VulkanExtendedFeatureProperties VkPhysicalDeviceVulkan12Features vulkan12Features = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES}; + // Cooperative vector features + VkPhysicalDeviceCooperativeVectorFeaturesNV cooperativeVectorFeatures = { + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_FEATURES_NV}; + // Ray tracing validation features VkPhysicalDeviceRayTracingValidationFeaturesNV rayTracingValidationFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_VALIDATION_FEATURES_NV}; @@ -352,6 +357,8 @@ struct VulkanApi VkPhysicalDeviceFeatures m_deviceFeatures; VkPhysicalDeviceMemoryProperties m_deviceMemoryProperties; VulkanExtendedFeatureProperties m_extendedFeatures; + + Slang::List<VkCooperativeVectorPropertiesNV> m_cooperativeVectorProperties; }; } // namespace gfx diff --git a/tools/gfx/vulkan/vk-device.cpp b/tools/gfx/vulkan/vk-device.cpp index 3654203da..cffa094ae 100644 --- a/tools/gfx/vulkan/vk-device.cpp +++ b/tools/gfx/vulkan/vk-device.cpp @@ -511,6 +511,10 @@ Result DeviceImpl::initVulkanInstanceAndDevice( extendedFeatures.clockFeatures.pNext = deviceFeatures2.pNext; deviceFeatures2.pNext = &extendedFeatures.clockFeatures; + // cooperative vector features + extendedFeatures.cooperativeVectorFeatures.pNext = deviceFeatures2.pNext; + deviceFeatures2.pNext = &extendedFeatures.cooperativeVectorFeatures; + // Atomic Float // To detect atomic float we need // https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.html @@ -748,6 +752,16 @@ Result DeviceImpl::initVulkanInstanceAndDevice( deviceCreateInfo.pNext = &extendedFeatures.vulkan12Features; } + if (extendedFeatures.cooperativeVectorFeatures.cooperativeVector) + { + deviceExtensions.add(VK_NV_COOPERATIVE_VECTOR_EXTENSION_NAME); + + extendedFeatures.cooperativeVectorFeatures.pNext = (void*)deviceCreateInfo.pNext; + deviceCreateInfo.pNext = &extendedFeatures.cooperativeVectorFeatures; + + m_features.add("cooperative-vector"); + } + VkPhysicalDeviceProperties2 extendedProps = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2}; VkPhysicalDeviceRayTracingPipelinePropertiesKHR rtProps = { |
