diff options
| author | AlxcBTW <187763517+AlxcBTW@users.noreply.github.com> | 2026-11-22 19:08:58 +0100 |
|---|---|---|
| committer | AlxcBTW <187763517+AlxcBTW@users.noreply.github.com> | 2026-11-22 19:08:58 +0100 |
| commit | 21f2585a48ce74c9a585fc90320e36a7658ec9ca (patch) | |
| tree | 8728a5321554ea5620e94f32f7e0433fee616a65 /runtime/src/vulkan_bindless.h | |
| parent | e8a23c1afcf8c2a6b64793984c0548af5331197a (diff) | |
| parent | ec8ec4c9a46c6623f1a9c125afd3566da97f1e0c (diff) | |
Merge remote-tracking branch 'origin/main' into bindless-per-queue-retire
# Conflicts:
# runtime/test/d3d12_descriptor_test.cpp
Diffstat (limited to 'runtime/src/vulkan_bindless.h')
| -rw-r--r-- | runtime/src/vulkan_bindless.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/src/vulkan_bindless.h b/runtime/src/vulkan_bindless.h index 9ca6cdc1a..1043f9c05 100644 --- a/runtime/src/vulkan_bindless.h +++ b/runtime/src/vulkan_bindless.h | |||
| @@ -348,6 +348,14 @@ public: | |||
| 348 | return bindless::multisampled(dimension) ? 0 : features_.counts[bindless::storage_binding(dimension, 0)]; | 348 | return bindless::multisampled(dimension) ? 0 : features_.counts[bindless::storage_binding(dimension, 0)]; |
| 349 | } | 349 | } |
| 350 | std::uint32_t sampler_capacity() const { return features_.counts[bindless::sampler_binding]; } | 350 | std::uint32_t sampler_capacity() const { return features_.counts[bindless::sampler_binding]; } |
| 351 | // How many more images of a dimension, or samplers, add_image and add_sampler can take before they return 0. | ||
| 352 | std::uint32_t free_images(ImageDimension dimension) const { | ||
| 353 | const auto& used = image_used_[std::uint32_t(dimension)]; | ||
| 354 | return std::uint32_t(std::count(used.begin(), used.end(), std::uint8_t(0))); | ||
| 355 | } | ||
| 356 | std::uint32_t free_samplers() const { | ||
| 357 | return std::uint32_t(std::count(sampler_used_.begin(), sampler_used_.end(), std::uint8_t(0))); | ||
| 358 | } | ||
| 351 | // Set 0 of every pipeline layout made for translated shaders. | 359 | // Set 0 of every pipeline layout made for translated shaders. |
| 352 | VkDescriptorSetLayout layout() const { return layout_; } | 360 | VkDescriptorSetLayout layout() const { return layout_; } |
| 353 | // Bound at set 0. flush() updates it in place until flush_replaces_table() is true: then the flush makes a new | 361 | // Bound at set 0. flush() updates it in place until flush_replaces_table() is true: then the flush makes a new |