upleb.uk

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

summaryrefslogtreecommitdiff
path: root/runtime/src
diff options
context:
space:
mode:
authoraslan2142 <jan.trencansky@protonmail.com>2026-11-25 23:02:37 +0100
committerGitHub <noreply@github.com>2026-11-25 23:02:37 +0100
commitd3b8251bc390418cdbc1f2d30727b6b31d889cfa (patch)
treeddbfea4c2c5e0c0de34ff607b32f076a0b70648c /runtime/src
parent6b843a4ad6e18e3fc6738d7a81fa9cb44d71188b (diff)
parent857314142c35983b792ca49652a25bb16ffb9371 (diff)
Merge pull request #1860 from lixonik/fix/title-3d-view-array-range
D3D-3D-VIEW-ARRAY-RANGE: use the single array layer for Vulkan 3D views
Diffstat (limited to 'runtime/src')
-rw-r--r--runtime/src/gfx10_descriptors.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/src/gfx10_descriptors.h b/runtime/src/gfx10_descriptors.h
index 219e0a8c5..acfa590f8 100644
--- a/runtime/src/gfx10_descriptors.h
+++ b/runtime/src/gfx10_descriptors.h
@@ -236,6 +236,16 @@ inline constexpr VkImageViewType vulkan_view_type(ImageType type) {
236 } 236 }
237} 237}
238 238
239inline constexpr VkImageSubresourceRange vulkan_subresource_range(const Image& image, VkImageAspectFlags aspects) {
240 const bool volume = image.type == ImageType::image_3d;
241 return {aspects, image.first_mip, image.mip_count, volume ? 0u : image.first_layer,
242 volume ? 1u : image.layer_count};
243}
244
245inline constexpr bool has_hardware_volume_uav_slice_offset(const ImageWords& words, const Image& image) {
246 return image.type == ImageType::image_3d && image.first_layer != 0 && detail::get(words[5], 0, 4) == 1;
247}
248
239// ---- formats ---- 249// ---- formats ----
240 250
241// One row for each Vulkan format: its GFX10_FORMAT code, and the DST_SEL that reads its channels as R, G, B, A 251// One row for each Vulkan format: its GFX10_FORMAT code, and the DST_SEL that reads its channels as R, G, B, A