Skip to content

Commit 679b6bd

Browse files
committed
Apply recent changes from the tutorial
"Descriptor set layout" instead of "descriptor layout"
1 parent 90dc07b commit 679b6bd

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

antora/modules/ROOT/nav.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
** xref:04_Vertex_buffers/01_Vertex_buffer_creation.adoc[Vertex buffer creation]
3535
** xref:04_Vertex_buffers/02_Staging_buffer.adoc[Staging buffer]
3636
** xref:04_Vertex_buffers/03_Index_buffer.adoc[Index buffer]
37-
* xref:05_Uniform_buffers/00_Descriptor_layout_and_buffer.adoc[Uniform buffers]
38-
** xref:05_Uniform_buffers/00_Descriptor_layout_and_buffer.adoc[Descriptor layout and buffer]
37+
* xref:05_Uniform_buffers/00_Descriptor_set_layout_and_buffer.adoc[Uniform buffers]
38+
** xref:05_Uniform_buffers/00_Descriptor_set_layout_and_buffer.adoc[Descriptor layout and buffer]
3939
** xref:05_Uniform_buffers/01_Descriptor_pool_and_sets.adoc[Descriptor pool and sets]
4040
* xref:06_Texture_mapping/00_Images.adoc[Texture mapping]
4141
** xref:06_Texture_mapping/00_Images.adoc[Images]

attachments/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
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.adoc renamed to en/05_Uniform_buffers/00_Descriptor_set_layout_and_buffer.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ A descriptor is a way for shaders to freely access resources like buffers and im
1212
We're going to set up a buffer that contains the transformation matrices and have the vertex shader access them through a descriptor.
1313
Usage of descriptors consists of three parts:
1414

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

19-
The _descriptor layout_ specifies the types of resources that are going to be accessed by the pipeline, just like a render pass specifies the types of attachments that will be accessed.
19+
The _descriptor set layout_ specifies the types of resources that are going to be accessed by the pipeline, just like a render pass specifies the types of attachments that will be accessed.
2020
A _descriptor set_ specifies the actual buffer or image resources that will be bound to the descriptors, just like a framebuffer specifies the actual image views to bind to render pass attachments.
2121
The descriptor set is then bound for the drawing commands just like the vertex buffers and framebuffer.
2222

@@ -80,7 +80,7 @@ void main() {
8080

8181
Note that the order of the `uniform`, `in` and `out` declarations doesn't matter.
8282
The `binding` directive is similar to the `location` directive for attributes.
83-
We're going to reference this binding in the descriptor layout.
83+
We're going to reference this binding in the descriptor set layout.
8484
The line with `gl_Position` is changed to use the transformations to compute the final position in clip coordinates.
8585
Unlike the 2D triangles, the last component of the clip coordinates may not be `1`, which will result in a division when converted to the final normalized device coordinates on the screen.
8686
This is used in perspective projection as the _perspective division_ and is essential for making closer objects look larger than objects that are further away.
@@ -194,7 +194,7 @@ pipelineLayoutInfo.pSetLayouts = &descriptorSetLayout;
194194
You may be wondering why it's possible to specify multiple descriptor set layouts here, because a single one already includes all of the bindings.
195195
We'll get back to that in the next chapter, where we'll look into descriptor pools and descriptor sets.
196196

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

200200
[,c++]
@@ -392,4 +392,4 @@ We may look at these in a future chapter.
392392

393393
In the next chapter we'll look at descriptor sets, which will actually bind the ``VkBuffer``s to the uniform buffer descriptors so that the shader can access this transformation data.
394394

395-
link:/attachments/22_descriptor_layout.cpp[C{pp} code] / link:/attachments/22_shader_ubo.vert[Vertex shader] / link:/attachments/22_shader_ubo.frag[Fragment shader]
395+
link:/attachments/22_descriptor_set_layout.cpp[C{pp} code] / link:/attachments/22_shader_ubo.vert[Vertex shader] / link:/attachments/22_shader_ubo.frag[Fragment shader]

en/05_Uniform_buffers/01_Descriptor_pool_and_sets.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
== Introduction
44

5-
The descriptor layout from the previous chapter describes the type of descriptors that can be bound.
5+
The descriptor set layout from the previous chapter describes the type of descriptors that can be bound.
66
In this chapter we're going to create a descriptor set for each `VkBuffer` resource to bind it to the uniform buffer descriptor.
77

88
== Descriptor pool
@@ -93,7 +93,7 @@ void createDescriptorSets() {
9393
----
9494

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

9898
[,c++]
9999
----
@@ -388,7 +388,7 @@ Don't forget to recompile your shader after removing the `foo` field.
388388
== Multiple descriptor sets
389389

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

394394
[,c++]

en/06_Texture_mapping/02_Combined_image_sampler.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ We looked at descriptors for the first time in the uniform buffers part of the t
66
In this chapter we will look at a new type of descriptor: _combined image sampler_.
77
This descriptor makes it possible for shaders to access an image resource through a sampler object like the one we created in the previous chapter.
88

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

1212
== Updating the descriptors

0 commit comments

Comments
 (0)