diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 01:37:54 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 01:37:54 -0500 |
| commit | d1d23d842d50a4320fc5afed148ec755be78db87 (patch) | |
| tree | 6e706ab85e5301ec36c5d3e8e99ff1cf73a7a838 /runtime/test/vk_harness.cpp | |
| parent | 48ad23f0262452b6c3d09db98941bfedb8e9684d (diff) | |
| parent | f040a941f785f6da910260fac5fb0ccc9d1504a9 (diff) | |
Merge pull request #804 from Jess-Doit
Diffstat (limited to 'runtime/test/vk_harness.cpp')
| -rw-r--r-- | runtime/test/vk_harness.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/test/vk_harness.cpp b/runtime/test/vk_harness.cpp index c7b023fea..ae178ab9e 100644 --- a/runtime/test/vk_harness.cpp +++ b/runtime/test/vk_harness.cpp | |||
| @@ -252,7 +252,8 @@ int main(int argc, char** argv) { | |||
| 252 | dci.queueCreateInfoCount = 1; dci.pQueueCreateInfos = &qci; | 252 | dci.queueCreateInfoCount = 1; dci.pQueueCreateInfos = &qci; |
| 253 | dci.enabledExtensionCount = uint32_t(enable.size()); dci.ppEnabledExtensionNames = enable.data(); | 253 | dci.enabledExtensionCount = uint32_t(enable.size()); dci.ppEnabledExtensionNames = enable.data(); |
| 254 | dci.pNext = chain; | 254 | dci.pNext = chain; |
| 255 | // VKH_GS=<geometry.spv>: insert a geometry stage between the vertex and fragment shaders. | 255 | // VKH_GS=<geometry.spv>: insert a geometry stage between the vertex and fragment shaders. VKH_SUBGROUP_SIZE then |
| 256 | // applies to it, unless VKH_GS_HELPER=1 says the GS only feeds the pixel shader under test. | ||
| 256 | const char* gs_path = std::getenv("VKH_GS"); | 257 | const char* gs_path = std::getenv("VKH_GS"); |
| 257 | if (gs_path && !f2q.features.geometryShader) { // MoltenVK: Metal has no geometry stage | 258 | if (gs_path && !f2q.features.geometryShader) { // MoltenVK: Metal has no geometry stage |
| 258 | std::fprintf(stderr, "unsupported: no geometryShader\n"); | 259 | std::fprintf(stderr, "unsupported: no geometryShader\n"); |
| @@ -386,11 +387,14 @@ int main(int argc, char** argv) { | |||
| 386 | reqSg.requiredSubgroupSize = req_sg; | 387 | reqSg.requiredSubgroupSize = req_sg; |
| 387 | if (req_sg > 0 && f13q.subgroupSizeControl && | 388 | if (req_sg > 0 && f13q.subgroupSizeControl && |
| 388 | req_sg >= sgProps.minSubgroupSize && req_sg <= sgProps.maxSubgroupSize) { | 389 | req_sg >= sgProps.minSubgroupSize && req_sg <= sgProps.maxSubgroupSize) { |
| 390 | // VKH_GS_HELPER=1: the geometry shader only feeds the pixel shader under test (the --bary-fallback | ||
| 391 | // pass-through), so the size still goes to the fragment stage. | ||
| 392 | const bool gs_tested = gs_path && !std::getenv("VKH_GS_HELPER"); | ||
| 389 | if (mesh && (sgProps.requiredSubgroupSizeStages & VK_SHADER_STAGE_MESH_BIT_EXT)) | 393 | if (mesh && (sgProps.requiredSubgroupSizeStages & VK_SHADER_STAGE_MESH_BIT_EXT)) |
| 390 | stages[0].pNext = &reqSg; | 394 | stages[0].pNext = &reqSg; |
| 391 | else if (gs_path && (sgProps.requiredSubgroupSizeStages & VK_SHADER_STAGE_GEOMETRY_BIT)) | 395 | else if (gs_tested && (sgProps.requiredSubgroupSizeStages & VK_SHADER_STAGE_GEOMETRY_BIT)) |
| 392 | stages[2].pNext = &reqSg; | 396 | stages[2].pNext = &reqSg; |
| 393 | else if (!mesh && !gs_path && (sgProps.requiredSubgroupSizeStages & VK_SHADER_STAGE_FRAGMENT_BIT)) | 397 | else if (!mesh && !gs_tested && (sgProps.requiredSubgroupSizeStages & VK_SHADER_STAGE_FRAGMENT_BIT)) |
| 394 | stages[1].pNext = &reqSg; | 398 | stages[1].pNext = &reqSg; |
| 395 | } | 399 | } |
| 396 | VkPipelineVertexInputStateCreateInfo vin{VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO}; | 400 | VkPipelineVertexInputStateCreateInfo vin{VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO}; |