diff options
| author | AlxcBTW <187763517+AlxcBTW@users.noreply.github.com> | 2026-11-22 19:22:39 +0100 |
|---|---|---|
| committer | AlxcBTW <187763517+AlxcBTW@users.noreply.github.com> | 2026-11-22 19:22:39 +0100 |
| commit | 2e5c9a9c4368e8ee339d9b13ee42e6b156093fd4 (patch) | |
| tree | f9c9550824e59fb93fc5c80fc6fcf3aeace4e630 /runtime/src/vulkan_backend.h | |
| parent | fbc11e973d5a1de721f8b70cd5721a8fe709fc3c (diff) | |
| parent | ec8ec4c9a46c6623f1a9c125afd3566da97f1e0c (diff) | |
Merge remote-tracking branch 'origin/main' into queue-wait-before-signal
Diffstat (limited to 'runtime/src/vulkan_backend.h')
| -rw-r--r-- | runtime/src/vulkan_backend.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/src/vulkan_backend.h b/runtime/src/vulkan_backend.h index a3ecc964a..54602c5fc 100644 --- a/runtime/src/vulkan_backend.h +++ b/runtime/src/vulkan_backend.h | |||
| @@ -1019,6 +1019,12 @@ public: | |||
| 1019 | replay_.zero_offset = offset; | 1019 | replay_.zero_offset = offset; |
| 1020 | replay_.zero_size = size; | 1020 | replay_.zero_size = size; |
| 1021 | } | 1021 | } |
| 1022 | |||
| 1023 | // Physical-device COLOR_ATTACHMENT format check for reinterpreted UAV clears. | ||
| 1024 | void set_color_attachment_format(std::function<bool(VkFormat)> check) { | ||
| 1025 | std::unique_lock lock(resource_mutex_); | ||
| 1026 | replay_.color_attachment_format = std::move(check); | ||
| 1027 | } | ||
| 1022 | std::uint64_t heap_base() { | 1028 | std::uint64_t heap_base() { |
| 1023 | std::shared_lock lock(resource_mutex_); | 1029 | std::shared_lock lock(resource_mutex_); |
| 1024 | return replay_.heap_base; | 1030 | return replay_.heap_base; |
| @@ -1244,10 +1250,10 @@ private: | |||
| 1244 | info.format = r.format; | 1250 | info.format = r.format; |
| 1245 | info.subresourceRange = range; | 1251 | info.subresourceRange = range; |
| 1246 | // Attachment views need only color-attachment usage. Inheriting STORAGE usage from a mutable/extended | 1252 | // Attachment views need only color-attachment usage. Inheriting STORAGE usage from a mutable/extended |
| 1247 | // resource (typeless RGBA8 sRGB views, or R32_UINT-backed R9G9B9E5 UAV images) would require unrelated usages. | 1253 | // resource (typeless views such as RGBA8 sRGB, or R32_UINT-backed R9G9B9E5 UAV images) would require unrelated usages. |
| 1248 | VkImageViewUsageCreateInfo usage{VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO}; | 1254 | VkImageViewUsageCreateInfo usage{VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO}; |
| 1249 | usage.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; | 1255 | usage.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; |
| 1250 | if (r.rgba8_typeless || (range.aspectMask == VK_IMAGE_ASPECT_COLOR_BIT && r.color_attachment)) | 1256 | if (r.typeless || (range.aspectMask == VK_IMAGE_ASPECT_COLOR_BIT && r.color_attachment)) |
| 1251 | info.pNext = &usage; | 1257 | info.pNext = &usage; |
| 1252 | VkImageView view = VK_NULL_HANDLE; | 1258 | VkImageView view = VK_NULL_HANDLE; |
| 1253 | if (vk.vkCreateImageView(device_, &info, nullptr, &view) != VK_SUCCESS) return VK_NULL_HANDLE; | 1259 | if (vk.vkCreateImageView(device_, &info, nullptr, &view) != VK_SUCCESS) return VK_NULL_HANDLE; |