diff options
| author | requiemsnkrp <317543573 +requiemsnkrp@users.noreply.github.com> | 2026-11-22 16:48:45 +0100 |
|---|---|---|
| committer | requiemsnkrp <317543573 +requiemsnkrp@users.noreply.github.com> | 2026-11-22 16:48:45 +0100 |
| commit | c48a39d2d07f26ae95ed1fd84594f4cfbd2a987d (patch) | |
| tree | 4bfab96aaa38af4501a6adb1e5b7ddeee815e080 /runtime/src/command_list.h | |
| parent | 4eb6155d3ac4f9d3fadb0d095c4ce13e76783615 (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/command_list.h')
| -rw-r--r-- | runtime/src/command_list.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/src/command_list.h b/runtime/src/command_list.h index 07520c2e3..fce4ab9f0 100644 --- a/runtime/src/command_list.h +++ b/runtime/src/command_list.h | |||
| @@ -150,8 +150,11 @@ inline constexpr std::uint32_t clear_depth = 0x1; | |||
| 150 | inline constexpr std::uint32_t clear_stencil = 0x2; | 150 | inline constexpr std::uint32_t clear_stencil = 0x2; |
| 151 | inline constexpr std::uint32_t texture_barrier_discard = 0x1; | 151 | inline constexpr std::uint32_t texture_barrier_discard = 0x1; |
| 152 | 152 | ||
| 153 | // Portable color-view interpretation. Other views inherit their resource format as before. | 153 | // The format a color view names, as a VkFormat number (0, `resource`, is the resource's own). The named values are |
| 154 | enum class ColorViewFormat : std::uint32_t { resource, rgba8_unorm, rgba8_srgb, rgba8_uint, rgba8_sint, rgba8_snorm }; | 154 | // the RGBA8 family's; a typeless resource of any other family stores its view's VkFormat the same way (D3D-275). |
| 155 | enum class ColorViewFormat : std::uint32_t { | ||
| 156 | resource = 0, rgba8_unorm = 37, rgba8_snorm = 38, rgba8_uint = 41, rgba8_sint = 42, rgba8_srgb = 43 | ||
| 157 | }; | ||
| 155 | 158 | ||
| 156 | // D3D12_QUERY_HEAP_TYPE and D3D12_QUERY_TYPE. | 159 | // D3D12_QUERY_HEAP_TYPE and D3D12_QUERY_TYPE. |
| 157 | namespace d3d12_query_heap { | 160 | namespace d3d12_query_heap { |