upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/vk_harness.cpp
diff options
context:
space:
mode:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-21 16:38:32 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-21 16:38:32 -0500
commita81bcb82842c34288c8d8a14c712cccd1997e77c (patch)
treee5423292391ea0d2630340ddfcd83d0bf87f08e6 /runtime/test/vk_harness.cpp
parente9cb0b0e68956ecffe0b52a05a8ccad034bbb06f (diff)
parentcdc67e4d20e793da260d08e55d0793d6952fc75f (diff)
Merge pull request #207 from LouisRiverstone
# Conflicts: # runtime/test/vk_harness.cpp
Diffstat (limited to 'runtime/test/vk_harness.cpp')
-rw-r--r--runtime/test/vk_harness.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/test/vk_harness.cpp b/runtime/test/vk_harness.cpp
index 2a197fd58..56cbda978 100644
--- a/runtime/test/vk_harness.cpp
+++ b/runtime/test/vk_harness.cpp
@@ -146,12 +146,14 @@ int main(int argc, char** argv) {
146 const bool mesh = group_readback || std::getenv("VKH_MESH") != nullptr; 146 const bool mesh = group_readback || std::getenv("VKH_MESH") != nullptr;
147 VkPhysicalDeviceMeshShaderFeaturesEXT meshf{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT}; 147 VkPhysicalDeviceMeshShaderFeaturesEXT meshf{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT};
148 if (mesh) { 148 if (mesh) {
149 // Query the feature, not just the extension. 77: the device cannot run this test (as vk_compute_test and
150 // vk_store_test), so the runners report SKIP.
149 VkPhysicalDeviceFeatures2 mesh_query{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2}; 151 VkPhysicalDeviceFeatures2 mesh_query{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2};
150 mesh_query.pNext = &meshf; 152 mesh_query.pNext = &meshf;
151 vkGetPhysicalDeviceFeatures2(pd, &mesh_query); 153 vkGetPhysicalDeviceFeatures2(pd, &mesh_query);
152 if (!has(VK_EXT_MESH_SHADER_EXTENSION_NAME) || !meshf.meshShader) { 154 if (!has(VK_EXT_MESH_SHADER_EXTENSION_NAME) || !meshf.meshShader) {
153 std::fprintf(stderr, "mesh shading unavailable\n"); 155 std::fprintf(stderr, "unsupported: no VK_EXT_mesh_shader\n");
154 return group_readback ? 77 : 1; 156 return 77;
155 } 157 }
156 enable.push_back(VK_EXT_MESH_SHADER_EXTENSION_NAME); 158 enable.push_back(VK_EXT_MESH_SHADER_EXTENSION_NAME);
157 meshf = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT}; 159 meshf = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT};
@@ -181,6 +183,10 @@ int main(int argc, char** argv) {
181 dci.pNext = chain; 183 dci.pNext = chain;
182 // VKH_GS=<geometry.spv>: insert a geometry stage between the vertex and fragment shaders. 184 // VKH_GS=<geometry.spv>: insert a geometry stage between the vertex and fragment shaders.
183 const char* gs_path = std::getenv("VKH_GS"); 185 const char* gs_path = std::getenv("VKH_GS");
186 if (gs_path && !f2q.features.geometryShader) { // MoltenVK: Metal has no geometry stage
187 std::fprintf(stderr, "unsupported: no geometryShader\n");
188 return 77;
189 }
184 VkPhysicalDeviceFeatures feats{}; 190 VkPhysicalDeviceFeatures feats{};
185 feats.geometryShader = gs_path ? VK_TRUE : VK_FALSE; 191 feats.geometryShader = gs_path ? VK_TRUE : VK_FALSE;
186 feats.shaderClipDistance = f2q.features.shaderClipDistance; 192 feats.shaderClipDistance = f2q.features.shaderClipDistance;