upleb.uk

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

summaryrefslogtreecommitdiff
path: root/runtime/src/vulkan_backend.h
diff options
context:
space:
mode:
authorrequiemsnkrp <317543573 +requiemsnkrp@users.noreply.github.com>2026-11-22 16:48:45 +0100
committerrequiemsnkrp <317543573 +requiemsnkrp@users.noreply.github.com>2026-11-22 16:48:45 +0100
commitc48a39d2d07f26ae95ed1fd84594f4cfbd2a987d (patch)
tree4bfab96aaa38af4501a6adb1e5b7ddeee815e080 /runtime/src/vulkan_backend.h
parent4eb6155d3ac4f9d3fadb0d095c4ce13e76783615 (diff)
D3D-275: typed RTVs of every typeless color family
- ColorViewFormat now holds the view's VkFormat number (the RGBA8 names keep their values), and CreateRenderTargetView accepts any typed format of a TYPELESS color texture's family (B8G8R8A8 and B8G8R8X8 kept apart), not only RGBA8. - ResourceBinding::rgba8_typeless becomes typeless (any TYPELESS color resource); color_view_format accepts a format of the resource's family (typeless_view_family, R8 included for when it is mapped), so clears go through a view in the RTV's format. Attachment views of every typeless image ask for color-attachment usage only. - d3d12_typeless_families_test: every typed RTV format of each family, two clear values, bytes compared with the host D3D12 on the same adapter (LUID) and reported against WARP. - docs/d3d12_vulkan.md: the typeless RTV section. AI-assisted.
Diffstat (limited to 'runtime/src/vulkan_backend.h')
-rw-r--r--runtime/src/vulkan_backend.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/src/vulkan_backend.h b/runtime/src/vulkan_backend.h
index 8683ae2de..79be8805c 100644
--- a/runtime/src/vulkan_backend.h
+++ b/runtime/src/vulkan_backend.h
@@ -1113,10 +1113,10 @@ private:
1113 info.format = r.format; 1113 info.format = r.format;
1114 info.subresourceRange = range; 1114 info.subresourceRange = range;
1115 // Attachment views need only color-attachment usage. Inheriting STORAGE usage from a mutable/extended 1115 // Attachment views need only color-attachment usage. Inheriting STORAGE usage from a mutable/extended
1116 // resource (typeless RGBA8 sRGB views, or R32_UINT-backed R9G9B9E5 UAV images) would require unrelated usages. 1116 // resource (typeless views such as RGBA8 sRGB, or R32_UINT-backed R9G9B9E5 UAV images) would require unrelated usages.
1117 VkImageViewUsageCreateInfo usage{VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO}; 1117 VkImageViewUsageCreateInfo usage{VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO};
1118 usage.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; 1118 usage.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
1119 if (r.rgba8_typeless || (range.aspectMask == VK_IMAGE_ASPECT_COLOR_BIT && r.color_attachment)) 1119 if (r.typeless || (range.aspectMask == VK_IMAGE_ASPECT_COLOR_BIT && r.color_attachment))
1120 info.pNext = &usage; 1120 info.pNext = &usage;
1121 VkImageView view = VK_NULL_HANDLE; 1121 VkImageView view = VK_NULL_HANDLE;
1122 if (vk.vkCreateImageView(device_, &info, nullptr, &view) != VK_SUCCESS) return VK_NULL_HANDLE; 1122 if (vk.vkCreateImageView(device_, &info, nullptr, &view) != VK_SUCCESS) return VK_NULL_HANDLE;