diff options
| author | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 19:09:24 +0100 |
|---|---|---|
| committer | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 19:09:24 +0100 |
| commit | 8d43271bcd727cb9732301bcc8cb9ac2b3d071f8 (patch) | |
| tree | d329715c2c79a5f19c4c4081911702aad5738e27 /runtime/src/vulkan_bindless.h | |
| parent | 538a9fd77d7c1632125da01f59f0cbdd3102c4e4 (diff) | |
| parent | ec8ec4c9a46c6623f1a9c125afd3566da97f1e0c (diff) | |
Merge upstream main into codex/d3d12-compute-trace
Trace at the Dispatch entry point while preserving the newly merged bundle replay path.
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 5f484bf16..d8a4c9846 100644 --- a/runtime/src/vulkan_bindless.h +++ b/runtime/src/vulkan_bindless.h | |||
| @@ -345,6 +345,14 @@ public: | |||
| 345 | return bindless::multisampled(dimension) ? 0 : features_.counts[bindless::storage_binding(dimension, 0)]; | 345 | return bindless::multisampled(dimension) ? 0 : features_.counts[bindless::storage_binding(dimension, 0)]; |
| 346 | } | 346 | } |
| 347 | std::uint32_t sampler_capacity() const { return features_.counts[bindless::sampler_binding]; } | 347 | std::uint32_t sampler_capacity() const { return features_.counts[bindless::sampler_binding]; } |
| 348 | // How many more images of a dimension, or samplers, add_image and add_sampler can take before they return 0. | ||
| 349 | std::uint32_t free_images(ImageDimension dimension) const { | ||
| 350 | const auto& used = image_used_[std::uint32_t(dimension)]; | ||
| 351 | return std::uint32_t(std::count(used.begin(), used.end(), std::uint8_t(0))); | ||
| 352 | } | ||
| 353 | std::uint32_t free_samplers() const { | ||
| 354 | return std::uint32_t(std::count(sampler_used_.begin(), sampler_used_.end(), std::uint8_t(0))); | ||
| 355 | } | ||
| 348 | // Set 0 of every pipeline layout made for translated shaders. | 356 | // Set 0 of every pipeline layout made for translated shaders. |
| 349 | VkDescriptorSetLayout layout() const { return layout_; } | 357 | VkDescriptorSetLayout layout() const { return layout_; } |
| 350 | // Bound at set 0. The same set for the life of this object: flush() updates it in place. | 358 | // Bound at set 0. The same set for the life of this object: flush() updates it in place. |