@@ -52,6 +52,14 @@ BufferView
5252
5353BufferView 文档阅读完毕
5454
55+ .. code-block :: glsl
56+
57+ // Texture Buffer(Uniform Texel Buffers)
58+ layout(set=m, binding=n) uniform textureBuffer myUniformTexelBuffer;
59+
60+ // Texture Buffer(Storage Texel Buffers)
61+ layout(set=m, binding=n, r32f) uniform imageBuffer myStorageTexelBuffer;
62+
5563---
5664
5765VkImageCreateInfo::arrayLayers
@@ -84,3 +92,34 @@ VkImageCreateInfo::arrayLayers
8492* ``arrayLayers `` 必须是 ``1 ``
8593* ``imageType `` 必须是 ``VK_IMAGE_TYPE_2D ``
8694* ``imageCreateMaybeLinear `` 必须是 ``VK_FALSE ``
95+
96+ ---
97+
98+ VkPhysicalDeviceLiits::maxFramebufferWidth
99+ VkPhysicalDeviceLiits::maxFramebufferHeight
100+
101+ ---
102+
103+ # VkImageView
104+
105+ View 的 usage 是继承自 Image 的:
106+
107+ * 如果 View 设置了 ``VkImageViewUsageCreateInfo `` 的话(pNext),可以覆写该 View 的 usage ,但必须是 image 的 usage 的子集。
108+ * 如果 image 是 depth-stencil 格式,并且使用 ``VkImageStencilUsageCreateInfo `` 创建的 image,View 的 usage 是依据 ``subresource.aspectMask `` 确定:
109+ * 如果 ``aspectMask `` 只包含 ``VK_IMAGE_ASPECT_STENCILE_BIT `` ,这意味着 usage 使用 ``VkImageStencilUsageCreateInfo::stencilUsage `` 的配置
110+ * 如果 ``aspectMask `` 只包含 ``VK_IMAGE_ASPECT_DEPTH_BIT `` ,这意味着 usage 使用 ``VkImageCreateInfo::usage `` 的配置
111+ * 如果 ``aspectMask `` 中上述两个都包含,这意味着 usage 使用 ``VkImageCreateInfo::usage `` 和 ``VkImageStencilUsageCreateInfo::stencilUsage ``
112+
113+ 如果 image 创建的时候指定了 ``VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT `` ,并且 ``format `` 不是 ``multi-planar `` 的话, view 的 format 可以和 image 的 format 不同,
114+ 此外如果 image 没有使用 ``VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT `` 创建的话,view 的 format 可以和 image 的 format 不同,但需要 ``兼容 `` 。
115+
116+ * ``VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT `` 表示 image 使用的压缩格式,并且该压缩格式可在 View 端进行解压缩
117+
118+ 相互兼容格式的 View 将会在 纹素坐标-内存地址 之间具有相同的映射,这仅仅是二进制解释样式发生了改变。
119+
120+ 如果 image 使用 ``VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT `` 创建的话, View 的 format 必须与 image 的 format 相兼容,要么 view 的 format 必须是压缩格式,且必须是 size-comatible (大小相兼容的)。在这种情况下,
121+ 获取到的 view 的 texel 维度 = 四舍五入((选择的 mip 等级 / 压缩的 texel 块大小))
122+
123+ ## VkImageView ComponentMap
124+
125+ 如果 view 用于 storage image/ input attachment / framebuffer attachment 和与 Y'CbCr 采样器相结合的 View,必须使用 一致性排列 (identify swizzle,也就是 ``VkComponentSwizzle::VK_COMPONENT_SWIZZLE_IDENTITY ``)。
0 commit comments