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:
authorZack <zmasi21@gmail.com>2026-12-02 04:09:12 -0800
committerZack <zmasi21@gmail.com>2026-12-02 04:09:12 -0800
commit155719f2755d1dbc89aa46a33abc6aa34a090abb (patch)
tree7f41aa57bfa6d8003d3334597e935aa07cd4dd72 /runtime/test/bindless_sizing_test.cpp
parenta62b4785268971d97cadf3dc7780a83c5414c90f (diff)
parent9b4d718992a343ef680d462203f3038fcef90c79 (diff)
d3d12/docs: merge main and add Series X 48 GB page-file sizing (#3109)
Forward-merges origin/main cleanly into d3d12/README.md, documents the measured Series X 58.8 GB commit footprint and fixed 32 GB page-file sizing on 48 GB RAM hosts from #3109 alongside residency.rs commit-reserve behavior, and switches the 8 GB starting command to direct PowerShell invocation so [hashtable]$More binds without stringification. Co-authored-by: mattiolocoding <mattiolocoding@users.noreply.github.com>
Diffstat (limited to 'runtime/test/bindless_sizing_test.cpp')
-rw-r--r--runtime/test/bindless_sizing_test.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/runtime/test/bindless_sizing_test.cpp b/runtime/test/bindless_sizing_test.cpp
index b83294852..435bf42c9 100644
--- a/runtime/test/bindless_sizing_test.cpp
+++ b/runtime/test/bindless_sizing_test.cpp
@@ -83,6 +83,7 @@ bool storage_consistent(const BindlessFeatures& f) {
83 if (bindless::r32ui_binding(dimension) != bindless::no_binding && 83 if (bindless::r32ui_binding(dimension) != bindless::no_binding &&
84 f.counts[bindless::r32ui_binding(dimension)] != held) 84 f.counts[bindless::r32ui_binding(dimension)] != held)
85 return false; 85 return false;
86 if (dimension == ImageDimension::dim_2d && f.counts[bindless::r64ui_binding] != held) return false;
86 } 87 }
87 // 1D arrays have no sampled capacity, but all three storage classes are always present. 88 // 1D arrays have no sampled capacity, but all three storage classes are always present.
88 const auto array = ImageDimension::dim_1d_array; 89 const auto array = ImageDimension::dim_1d_array;
@@ -304,6 +305,31 @@ int main() {
304 305
305 // The default features are today's counts, which the device-less users (vk_image_fuzz) still get. 306 // The default features are today's counts, which the device-less users (vk_image_fuzz) still get.
306 EXPECT(BindlessFeatures{}.counts == defaults); 307 EXPECT(BindlessFeatures{}.counts == defaults);
308
309 // Binding 29 (2D r64ui storage images) is gated on shader_image_int64_atomics and tracks 2D storage capacity.
310 {
311 static_assert(bindless::binding_count == 30 && bindless::r64ui_binding == 29);
312 static_assert(defaults[bindless::r64ui_binding] == 1024);
313 BindlessFeatures f{};
314 f.update_after_bind = f.partially_bound = true;
315 f.shader_image_int64_atomics = true;
316 EXPECT(bindless::binding_enabled(bindless::r64ui_binding, f));
317 const bindless::SetLayout layout(f);
318 EXPECT(layout.info.bindingCount == 24 && layout.flags_info.bindingCount == 24);
319 const auto& last = layout.entries[layout.info.bindingCount - 1];
320 EXPECT(last.binding == bindless::r64ui_binding &&
321 last.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE &&
322 last.descriptorCount == 1024);
323
324 const Device d = uniform(1048576, 1048576);
325 BindlessFeatures sized = with_ms(true);
326 sized.shader_image_int64_atomics = true;
327 EXPECT(bindless::size_bindings(sized, d.limits, d.v11, d.v12));
328 EXPECT(sized.counts[bindless::r64ui_binding] == bindless::max_storage_indices);
329 EXPECT(totals(sized).all == 325729 + bindless::max_storage_indices);
330 EXPECT(storage_consistent(sized));
331 }
332
307 std::printf("bindless sizing: synthetic limits gave the expected counts\n"); 333 std::printf("bindless sizing: synthetic limits gave the expected counts\n");
308 return 0; 334 return 0;
309} 335}