upleb.uk

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

summaryrefslogtreecommitdiff
path: root/runtime/test/bindless_sizing_test.cpp
diff options
context:
space:
mode:
authorVonsek <45567075+Vonsek@users.noreply.github.com>2026-11-22 19:08:54 +0100
committerVonsek <45567075+Vonsek@users.noreply.github.com>2026-11-22 19:08:54 +0100
commit3af42c619253941610d9809e8a28a07e8dfdfdf2 (patch)
treea675793195f8bc69c3caebb0e9614ecfb65e1c4c /runtime/test/bindless_sizing_test.cpp
parente6af0a0931639ff33cdd4a28289da984f194c87e (diff)
parentec8ec4c9a46c6623f1a9c125afd3566da97f1e0c (diff)
merge: preserve upstream changes alongside the asset fix
Diffstat (limited to 'runtime/test/bindless_sizing_test.cpp')
-rw-r--r--runtime/test/bindless_sizing_test.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/test/bindless_sizing_test.cpp b/runtime/test/bindless_sizing_test.cpp
index 07715f01e..4553f25b6 100644
--- a/runtime/test/bindless_sizing_test.cpp
+++ b/runtime/test/bindless_sizing_test.cpp
@@ -203,6 +203,22 @@ int main() {
203 EXPECT(totals(f).all <= 6159 || (count(f, D::dim_2d) == 4096 && f.counts[bindless::sampler_binding] == 1024)); 203 EXPECT(totals(f).all <= 6159 || (count(f, D::dim_2d) == 4096 && f.counts[bindless::sampler_binding] == 1024));
204 } 204 }
205 205
206 // MoltenVK 1.4.3 on an M3 Max: update-after-bind limits of 1000000 sampled images and 500000 samplers, but
207 // maxPerSetDescriptors 1212 and a vkGetDescriptorSetLayoutSupport that accepts only fewer descriptors than that
208 // (MVKDevice::getDescriptorSetLayoutSupport), though the device creates and samples far larger sets. So the
209 // set keeps the default counts: 1024 samplers, short of a full D3D12 sampler heap (d3d12_descriptor_test).
210 {
211 Device d = uniform(1048576, 1000000);
212 d.v12.maxPerStageDescriptorUpdateAfterBindSamplers = d.v12.maxDescriptorSetUpdateAfterBindSamplers = 500000;
213 d.limits.maxSamplerAllocationCount = 500000;
214 d.v11.maxPerSetDescriptors = 1212;
215 const auto below_1212 = [](const BindlessFeatures& candidate) { return totals(candidate).all < 1212; };
216 BindlessFeatures f = with_ms(true);
217 EXPECT(bindless::size_bindings(f, d.limits, d.v11, d.v12, below_1212));
218 EXPECT(count(f, D::dim_2d) == 4096 && f.counts[bindless::sampler_binding] == 1024 &&
219 storage(f, D::dim_2d) == 256);
220 }
221
206 // The default features are today's counts, which the device-less users (vk_image_fuzz) still get. 222 // The default features are today's counts, which the device-less users (vk_image_fuzz) still get.
207 EXPECT(BindlessFeatures{}.counts == defaults); 223 EXPECT(BindlessFeatures{}.counts == defaults);
208 std::printf("bindless sizing: synthetic limits gave the expected counts\n"); 224 std::printf("bindless sizing: synthetic limits gave the expected counts\n");