diff options
| author | Felix Croasdale <205819305+etcetera-yt@users.noreply.github.com> | 2026-11-22 01:08:45 -0600 |
|---|---|---|
| committer | Felix Croasdale <205819305+etcetera-yt@users.noreply.github.com> | 2026-11-22 01:52:32 -0600 |
| commit | 71eea4a73eaf437553dfd09529df5306be53c113 (patch) | |
| tree | ef9bfea91d5c8526ed2f12b682180834fb2a1fdf /runtime/test/vk_bindless_test.cpp | |
| parent | d3841c0c0ee41ec014699a985846c6dc76026440 (diff) | |
GPU tests: vk_bindless_test and vk_image_fuzz skip below 144 push constant bytes (TEST-149)
Both harnesses create a pipeline layout with the 144-byte translated
user-data block and never checked maxPushConstantsSize, so on a
128-byte device (Intel Arc, some AMD drivers) they failed validation
instead of skipping, although every pixel was exact. Each now prints
"unsupported: need 144 push constant bytes, device has N" and exits
77 before creating anything, as vk_texture_test does since 0c84bff;
the range uses the same constant.
run_gpu_tests.py already reported ps_tex's 77 as SKIP; image_fuzz.py
skipped it with a fixed message and now quotes the harness's
unsupported line. CPU tests cover both runners' 77 path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/vk_bindless_test.cpp')
| -rw-r--r-- | runtime/test/vk_bindless_test.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/test/vk_bindless_test.cpp b/runtime/test/vk_bindless_test.cpp index 965eb1d3e..61de1a91e 100644 --- a/runtime/test/vk_bindless_test.cpp +++ b/runtime/test/vk_bindless_test.cpp | |||
| @@ -169,6 +169,14 @@ int main(int argc, char** argv) { | |||
| 169 | VkPhysicalDeviceProperties2 props{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, &props12}; | 169 | VkPhysicalDeviceProperties2 props{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, &props12}; |
| 170 | vkGetPhysicalDeviceProperties2(pd, &props); | 170 | vkGetPhysicalDeviceProperties2(pd, &props); |
| 171 | std::printf("device: %s%s\n", props.properties.deviceName, validation ? " (validation on)" : ""); | 171 | std::printf("device: %s%s\n", props.properties.deviceName, validation ? " (validation on)" : ""); |
| 172 | // The pipeline layout pushes the 144-byte translated user-data block. A device with fewer push constant bytes | ||
| 173 | // (128 on Intel Arc and some AMD drivers) can't create it: a device limit, not a wrong result (TEST-149). | ||
| 174 | constexpr std::uint32_t push_bytes = 144; | ||
| 175 | if (props.properties.limits.maxPushConstantsSize < push_bytes) { | ||
| 176 | std::printf("unsupported: need %u push constant bytes, device has %u\n", push_bytes, | ||
| 177 | props.properties.limits.maxPushConstantsSize); | ||
| 178 | return unsupported; | ||
| 179 | } | ||
| 172 | 180 | ||
| 173 | // The features ps_tex's metadata names (bufferDeviceAddress, runtimeDescriptorArray, shaderInt64), dynamic | 181 | // The features ps_tex's metadata names (bufferDeviceAddress, runtimeDescriptorArray, shaderInt64), dynamic |
| 174 | // indexing of the image array, and whichever descriptor-indexing flags the set can use. | 182 | // indexing of the image array, and whichever descriptor-indexing flags the set can use. |
| @@ -515,7 +523,7 @@ int main(int argc, char** argv) { | |||
| 515 | BindlessSet set(vkGetDeviceProcAddr, dev, mp, flags); | 523 | BindlessSet set(vkGetDeviceProcAddr, dev, mp, flags); |
| 516 | EXPECT(set.ok() && set.layout() && set.set()); | 524 | EXPECT(set.ok() && set.layout() && set.set()); |
| 517 | 525 | ||
| 518 | const VkPushConstantRange push{VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT, 0, 144}; | 526 | const VkPushConstantRange push{VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT, 0, push_bytes}; |
| 519 | const VkDescriptorSetLayout set_layout = set.layout(); | 527 | const VkDescriptorSetLayout set_layout = set.layout(); |
| 520 | VkPipelineLayoutCreateInfo pli{VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO}; | 528 | VkPipelineLayoutCreateInfo pli{VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO}; |
| 521 | pli.setLayoutCount = 1; | 529 | pli.setLayoutCount = 1; |