diff options
| author | Luiz Neves <luizgustavobenicio@gmail.com> | 2026-11-21 18:28:19 -0300 |
|---|---|---|
| committer | Luiz Neves <luizgustavobenicio@gmail.com> | 2026-11-21 18:29:45 -0300 |
| commit | cdc67e4d20e793da260d08e55d0793d6952fc75f (patch) | |
| tree | e997dcc2d1b71158fa6b7492e5d19762d870b44a /runtime/test/vk_harness.cpp | |
| parent | 4e390e0871d7265e629b51aca8ff99a15a6a6845 (diff) | |
GPU tests: report gs_tri/ms_tri as SKIP without geometry or mesh shaders (TEST-18)
vk_harness exits 77, the code vk_compute_test and vk_store_test already use for a
device that cannot run a test, when VKH_GS is set and the device has no
geometryShader, or VKH_MESH is set and it has no VK_EXT_mesh_shader. Before, a
missing mesh extension exited 1 and a missing geometryShader failed in
vkCreateDevice with VK_ERROR_FEATURE_NOT_PRESENT (MoltenVK, #166).
run_gpu_tests.py (gs_tri, ms_tri, ms_w64x_ballot, ms_clip) and check.py
(ms_w64x_ballot) turn that exit code into SKIP, quoting the harness's reason.
Diffstat (limited to 'runtime/test/vk_harness.cpp')
| -rw-r--r-- | runtime/test/vk_harness.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/test/vk_harness.cpp b/runtime/test/vk_harness.cpp index 1c29cce86..cdce9e06b 100644 --- a/runtime/test/vk_harness.cpp +++ b/runtime/test/vk_harness.cpp | |||
| @@ -105,7 +105,8 @@ int main(int argc, char** argv) { | |||
| 105 | const bool mesh = std::getenv("VKH_MESH") != nullptr; | 105 | const bool mesh = std::getenv("VKH_MESH") != nullptr; |
| 106 | VkPhysicalDeviceMeshShaderFeaturesEXT meshf{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT}; | 106 | VkPhysicalDeviceMeshShaderFeaturesEXT meshf{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT}; |
| 107 | if (mesh) { | 107 | if (mesh) { |
| 108 | if (!has(VK_EXT_MESH_SHADER_EXTENSION_NAME)) { std::fprintf(stderr, "no VK_EXT_mesh_shader\n"); return 1; } | 108 | // 77: the device cannot run this test (as vk_compute_test and vk_store_test), so the runners report SKIP. |
| 109 | if (!has(VK_EXT_MESH_SHADER_EXTENSION_NAME)) { std::fprintf(stderr, "unsupported: no VK_EXT_mesh_shader\n"); return 77; } | ||
| 109 | enable.push_back(VK_EXT_MESH_SHADER_EXTENSION_NAME); | 110 | enable.push_back(VK_EXT_MESH_SHADER_EXTENSION_NAME); |
| 110 | meshf.meshShader = VK_TRUE; meshf.pNext = chain; chain = &meshf; | 111 | meshf.meshShader = VK_TRUE; meshf.pNext = chain; chain = &meshf; |
| 111 | } | 112 | } |
| @@ -133,6 +134,10 @@ int main(int argc, char** argv) { | |||
| 133 | dci.pNext = chain; | 134 | dci.pNext = chain; |
| 134 | // VKH_GS=<geometry.spv>: insert a geometry stage between the vertex and fragment shaders. | 135 | // VKH_GS=<geometry.spv>: insert a geometry stage between the vertex and fragment shaders. |
| 135 | const char* gs_path = std::getenv("VKH_GS"); | 136 | const char* gs_path = std::getenv("VKH_GS"); |
| 137 | if (gs_path && !f2q.features.geometryShader) { // MoltenVK: Metal has no geometry stage | ||
| 138 | std::fprintf(stderr, "unsupported: no geometryShader\n"); | ||
| 139 | return 77; | ||
| 140 | } | ||
| 136 | VkPhysicalDeviceFeatures feats{}; | 141 | VkPhysicalDeviceFeatures feats{}; |
| 137 | feats.geometryShader = gs_path ? VK_TRUE : VK_FALSE; | 142 | feats.geometryShader = gs_path ? VK_TRUE : VK_FALSE; |
| 138 | feats.shaderClipDistance = f2q.features.shaderClipDistance; | 143 | feats.shaderClipDistance = f2q.features.shaderClipDistance; |