Skip to content

Commit 71b71e4

Browse files
authored
replace "descriptor layout" with "descriptor set layout" (#358)
1 parent 898f655 commit 71b71e4

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

code/22_descriptor_layout.cpp renamed to code/22_descriptor_set_layout.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ class HelloTriangleApplication {
232232
vkDestroyPipeline(device, graphicsPipeline, nullptr);
233233
vkDestroyPipelineLayout(device, pipelineLayout, nullptr);
234234
vkDestroyRenderPass(device, renderPass, nullptr);
235-
235+
236236
for (size_t i = 0; i < MAX_FRAMES_IN_FLIGHT; i++) {
237237
vkDestroyBuffer(device, uniformBuffers[i], nullptr);
238238
vkFreeMemory(device, uniformBuffersMemory[i], nullptr);
@@ -593,7 +593,7 @@ class HelloTriangleApplication {
593593
viewportState.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO;
594594
viewportState.viewportCount = 1;
595595
viewportState.scissorCount = 1;
596-
596+
597597
VkPipelineRasterizationStateCreateInfo rasterizer{};
598598
rasterizer.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
599599
rasterizer.depthClampEnable = VK_FALSE;
@@ -751,7 +751,7 @@ class HelloTriangleApplication {
751751

752752
for (size_t i = 0; i < MAX_FRAMES_IN_FLIGHT; i++) {
753753
createBuffer(bufferSize, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, uniformBuffers[i], uniformBuffersMemory[i]);
754-
754+
755755
vkMapMemory(device, uniformBuffersMemory[i], 0, bufferSize, 0, &uniformBuffersMapped[i]);
756756
}
757757
}

code/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ add_chapter (21_index_buffer
128128
SHADER 18_shader_vertexbuffer
129129
LIBS glm::glm)
130130

131-
add_chapter (22_descriptor_layout
131+
add_chapter (22_descriptor_set_layout
132132
SHADER 22_shader_ubo
133133
LIBS glm::glm)
134134

en/05_Uniform_buffers/00_Descriptor_layout_and_buffer.md renamed to en/05_Uniform_buffers/00_Descriptor_set_layout_and_buffer.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ images. We're going to set up a buffer that contains the transformation matrices
1313
and have the vertex shader access them through a descriptor. Usage of
1414
descriptors consists of three parts:
1515

16-
* Specify a descriptor layout during pipeline creation
16+
* Specify a descriptor set layout during pipeline creation
1717
* Allocate a descriptor set from a descriptor pool
1818
* Bind the descriptor set during rendering
1919

20-
The *descriptor layout* specifies the types of resources that are going to be
20+
The *descriptor set layout* specifies the types of resources that are going to be
2121
accessed by the pipeline, just like a render pass specifies the types of
2222
attachments that will be accessed. A *descriptor set* specifies the actual
2323
buffer or image resources that will be bound to the descriptors, just like a
@@ -86,7 +86,7 @@ void main() {
8686

8787
Note that the order of the `uniform`, `in` and `out` declarations doesn't
8888
matter. The `binding` directive is similar to the `location` directive for
89-
attributes. We're going to reference this binding in the descriptor layout. The
89+
attributes. We're going to reference this binding in the descriptor set layout. The
9090
line with `gl_Position` is changed to use the transformations to compute the
9191
final position in clip coordinates. Unlike the 2D triangles, the last component
9292
of the clip coordinates may not be `1`, which will result in a division when
@@ -208,7 +208,7 @@ layouts here, because a single one already includes all of the bindings. We'll
208208
get back to that in the next chapter, where we'll look into descriptor pools and
209209
descriptor sets.
210210

211-
The descriptor layout should stick around while we may create new graphics
211+
The descriptor set layout should stick around while we may create new graphics
212212
pipelines i.e. until the program ends:
213213

214214
```c++
@@ -411,6 +411,6 @@ In the next chapter we'll look at descriptor sets, which will actually bind the
411411
`VkBuffer`s to the uniform buffer descriptors so that the shader can access this
412412
transformation data.
413413
414-
[C++ code](/code/22_descriptor_layout.cpp) /
414+
[C++ code](/code/22_descriptor_set_layout.cpp) /
415415
[Vertex shader](/code/22_shader_ubo.vert) /
416416
[Fragment shader](/code/22_shader_ubo.frag)

en/05_Uniform_buffers/01_Descriptor_pool_and_sets.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Introduction
22

3-
The descriptor layout from the previous chapter describes the type of
3+
The descriptor set layout from the previous chapter describes the type of
44
descriptors that can be bound. In this chapter we're going to create
55
a descriptor set for each `VkBuffer` resource to bind it to the
66
uniform buffer descriptor.
@@ -95,7 +95,7 @@ void createDescriptorSets() {
9595

9696
A descriptor set allocation is described with a `VkDescriptorSetAllocateInfo`
9797
struct. You need to specify the descriptor pool to allocate from, the number of
98-
descriptor sets to allocate, and the descriptor layout to base them on:
98+
descriptor sets to allocate, and the descriptor set layout to base them on:
9999

100100
```c++
101101
std::vector<VkDescriptorSetLayout> layouts(MAX_FRAMES_IN_FLIGHT, descriptorSetLayout);
@@ -374,7 +374,7 @@ Don't forget to recompile your shader after removing the `foo` field.
374374
## Multiple descriptor sets
375375

376376
As some of the structures and function calls hinted at, it is actually possible
377-
to bind multiple descriptor sets simultaneously. You need to specify a descriptor layout for
377+
to bind multiple descriptor sets simultaneously. You need to specify a descriptor set layout for
378378
each descriptor set when creating the pipeline layout. Shaders can then
379379
reference specific descriptor sets like this:
380380

en/06_Texture_mapping/02_Combined_image_sampler.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ image sampler*. This descriptor makes it possible for shaders to access an image
66
resource through a sampler object like the one we created in the previous
77
chapter.
88

9-
We'll start by modifying the descriptor layout, descriptor pool and descriptor
9+
We'll start by modifying the descriptor set layout, descriptor pool and descriptor
1010
set to include such a combined image sampler descriptor. After that, we're going
1111
to add texture coordinates to `Vertex` and modify the fragment shader to read
1212
colors from the texture instead of just interpolating the vertex colors.

0 commit comments

Comments
 (0)