diff options
| author | gabsilvs <142851434+gabsilvs@users.noreply.github.com> | 2026-11-22 21:19:17 -0300 |
|---|---|---|
| committer | gabsilvs <142851434+gabsilvs@users.noreply.github.com> | 2026-11-22 21:19:17 -0300 |
| commit | b9a8aca16a1550566ee042d5656d4443d6525912 (patch) | |
| tree | 8b5f1190900663d25bd6a51e15e0576c1e3dc517 /runtime/test/vk_harness.cpp | |
| parent | aa2988cc555bad7ecd508b48a702adbb32fe7c95 (diff) | |
GPU tests: skip a draw when any stage needs OpFmaKHR the device lacks
docs/testing.md says a module that needs OpFmaKHR exits 77 (a SKIP) on a
device without VK_KHR_shader_fma, but only the fragment module was checked
in vk_harness, and vk_texture_test, vk_sampler_test and vk_bindless_test
never refused the vertex module (vs_ids carries FMAKHR). Under
LEONIDA_FMA=khr such a pair failed vkCreateGraphicsPipelines with -13 and
run_gpu_tests.py reported a FAIL.
ShaderFma::accepts_file() checks one module file. vk_harness (vertex module,
VKH_MESH_COMPUTE module), vk_texture_test, vk_sampler_test and
vk_bindless_test use it for every stage; vk_sampler_test also enables the
feature when the device has it, like the others. judge_cs_dump treats exit 77
with an "unsupported:" line as a skip for the non-wave64 dumps too
(cs_w32_new_ops).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015z45kpL5aWzXuYTbhn6b52
Diffstat (limited to 'runtime/test/vk_harness.cpp')
| -rw-r--r-- | runtime/test/vk_harness.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/test/vk_harness.cpp b/runtime/test/vk_harness.cpp index a9b97d31e..65d4eec1a 100644 --- a/runtime/test/vk_harness.cpp +++ b/runtime/test/vk_harness.cpp | |||
| @@ -309,10 +309,13 @@ int main(int argc, char** argv) { | |||
| 309 | argv[2], VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME); | 309 | argv[2], VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME); |
| 310 | return 77; | 310 | return 77; |
| 311 | } | 311 | } |
| 312 | // OpFmaKHR (rdna2spirv.py --fma khr) needs VK_KHR_shader_fma; the fragment shader decides whether it is refused. | 312 | // OpFmaKHR (rdna2spirv.py --fma khr) needs VK_KHR_shader_fma; a module of ANY stage that needs it is refused |
| 313 | // (argv[1] is the vertex shader, or the mesh shader run as compute under VKH_MESH_COMPUTE). | ||
| 313 | leonida::vk_test::ShaderFma fma; | 314 | leonida::vk_test::ShaderFma fma; |
| 314 | fma.query(gipa, inst, pd); | 315 | fma.query(gipa, inst, pd); |
| 315 | if (!fma.accepts(fs_code.data(), fs_code.size() * 4, argv[2])) return 77; | 316 | if (!fma.accepts(fs_code.data(), fs_code.size() * 4, argv[2])) return 77; |
| 317 | if (!fma.accepts_file(argv[1])) return 77; | ||
| 318 | if (!fma.accepts_file(std::getenv("VKH_MESH_COMPUTE"))) return 77; | ||
| 316 | std::vector<const char*> enable; | 319 | std::vector<const char*> enable; |
| 317 | void* chain = nullptr; | 320 | void* chain = nullptr; |
| 318 | if (fma.supported()) { | 321 | if (fma.supported()) { |