Skip to content

Commit 5af2a01

Browse files
committed
update vulkan notes
1 parent 70fe3d0 commit 5af2a01

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

_posts/Graphics/Vulkan Notes.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
TODO:解释 vulkan 里的各种 memory type
1313
TODO:跳过了 sparse image / buffer 的部分
14+
TODO:Access flags,image tiling, image layout,Image Aspect Flags 这几个概念的关系和区别是什么
15+
TODO:第六章的 texel buffer 一节说 texel buffer 应该认为是 1D texture?没有 2D texture 吗
1416
### Vulkan Memory
1517
通过 `vkGetPhysicalDeviceMemoryProperties` API 获取 memory type 和 memory heap
1618

@@ -25,5 +27,28 @@ TODO:跳过了 sparse image / buffer 的部分
2527

2628
`VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT`
2729
`VK_MEMORY_PROPERTY_HOST_COHERENT_BIT`
28-
29-
30+
### 管线概念关系
31+
* descriptor set layout,pipeline layout
32+
* descriptor set pool,descriptor set,descriptor
33+
* sampler
34+
* image
35+
* uniform block / storage block / texel buffer
36+
* push constant
37+
* render pass,subpass
38+
39+
**整个 `vkCreateGraphicsPipelines` 函数接收的输入**
40+
第一部分是 shader 代码 --> 由 `VkPipelineShaderStageCreateInfo` 描述
41+
第二部分是各个 stage 的参数
42+
* input vertex format --> 由 `VkPipelineVertexInputStateCreateInfo` 描述
43+
* 其中 `VkVertexInputBindingDescription` 描述了每个 input vertex buffer,每个 buffer 中结构体数据的步长
44+
* `VkVertexInputAttributeDescription` 描述了每个 input vertex attribute,包括它的 location(对应 shader 中的 location),它所在的 vertex buffer,它在结构体数据中的 offset,它的类型(**我感觉这里的 binding 字段只是用来索引后续的 vertex buffer 的,和 shader 代码没有关系,也不意味着不同 binding 的 attribute 可以使用相同的 location**)
45+
* input assembly:由 `VkPipelineInputAssemblyStateCreateInfo` 描述,它表示渲染的 primitive 是什么,输入的 vertex 如何组装成 primitive
46+
* Tessellation State:TODO
47+
* Viewport State:描述 viewport 的大小,用于 viewport transform,TODO:解释 scissor test 和 multiple viewport
48+
* Rasterization State:描述背面剔除模式,深度变换方式(例如投影矩阵的 inverse z),线宽等等
49+
* Multisample State:TODO
50+
* Depth and Stencil State:描述做深度测试和模板测速时的各种参数
51+
* Color Blend State:描述如何做 blending
52+
第三部分是 dynamic state:描述各个 stage 的参数的哪些部分允许后续动态修改
53+
第四部分是 pipeline layout:TODO,解释
54+
第五部分是 render pass 和 subpass,TODO,解释

0 commit comments

Comments
 (0)