Skip to content

Commit e6ec529

Browse files
authored
Transcoded version of extension sample push_descriptors based on Vulkan-Hpp (#1220)
1 parent 70f2fd9 commit e6ec529

File tree

7 files changed

+494
-1
lines changed

7 files changed

+494
-1
lines changed

antora/modules/ROOT/nav.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@
7373
** xref:samples/extensions/memory_budget/README.adoc[Memory budget]
7474
** xref:samples/extensions/mesh_shader_culling/README.adoc[Mesh shader culling]
7575
** xref:samples/extensions/mesh_shading/README.adoc[Mesh shading]
76+
*** xref:samples/extensions/hpp_mesh_shading/README.adoc[Mesh shading (Vulkan-Hpp)]
7677
** xref:samples/extensions/open_cl_interop/README.adoc[OpenCL interop]
7778
** xref:samples/extensions/open_cl_interop_arm/README.adoc[OpenCL interop (Arm)]
7879
** xref:samples/extensions/open_gl_interop/README.adoc[OpenGL interop]
7980
** xref:samples/extensions/portability/README.adoc[Portability]
8081
** xref:samples/extensions/push_descriptors/README.adoc[Push descriptors]
82+
*** xref:samples/extensions/hpp_push_descriptors/README.adoc[Push descriptors (Vulkan-Hpp)]
8183
** xref:samples/extensions/ray_tracing_basic/README.adoc[Raytracing basic]
8284
** xref:samples/extensions/ray_tracing_extended/README.adoc[Raytracing extended]
8385
** xref:samples/extensions/ray_queries/README.adoc[Ray queries]

samples/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ set(ORDER_LIST
133133

134134
#HPP Extension Samples
135135
"hpp_mesh_shading"
136+
"hpp_push_descriptors"
136137

137138
#HPP Performance Samples
138139
"hpp_pipeline_cache"

samples/extensions/README.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ See this https://www.khronos.org/blog/streamlining-subpasses[this blogpost].
5050
Push descriptors apply the push constants concept to descriptor sets.
5151
Instead of creating per-object descriptor sets, this example passes descriptors at command buffer creation time.
5252

53+
=== xref:./{extension_samplespath}hpp_push_descriptors/README.adoc[HPP Push Descriptors]
54+
55+
A transcoded version of the Extensions sample <<push_descriptors,Push Descriptors>> that illustrates the usage of the C{pp} bindings of vulkan provided by Vulkan-Hpp.
56+
5357
=== xref:./{extension_samplespath}debug_utils/README.adoc[Debug Utilities]
5458

5559
*Extension*: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_debug_utils[`VK_EXT_debug_utils`]
@@ -107,7 +111,7 @@ This replaces the vertex / geometry shader standard pipeline.
107111

108112
=== xref:./{extension_samplespath}hpp_mesh_shading/README.adoc[HPP Mesh shading]
109113

110-
A transcoded version of the Extensions sample <<mesh_shading,Mesh shading>> that illustrates the usage of the C{pp} bindings of vulkan provided by vulkan.hpp.
114+
A transcoded version of the Extensions sample <<mesh_shading,Mesh shading>> that illustrates the usage of the C{pp} bindings of vulkan provided by Vulkan-Hpp.
111115

112116
=== xref:./{extension_samplespath}open_gl_interop/README.adoc[OpenGL interoperability]
113117

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright (c) 2019-2024, Sascha Willems
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 the "License";
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
get_filename_component(FOLDER_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
19+
get_filename_component(PARENT_DIR ${CMAKE_CURRENT_LIST_DIR} PATH)
20+
get_filename_component(CATEGORY_NAME ${PARENT_DIR} NAME)
21+
22+
add_sample_with_tags(
23+
ID ${FOLDER_NAME}
24+
CATEGORY ${CATEGORY_NAME}
25+
AUTHOR "Sascha Willems"
26+
NAME "HPP Push descriptors"
27+
DESCRIPTION "Using VK_KHR_push_descriptor for push constant like use of descriptors, using Vulkan-Hpp"
28+
SHADER_FILES_GLSL
29+
"push_descriptors/glsl/cube.vert"
30+
"push_descriptors/glsl/cube.frag"
31+
SHADER_FILES_HLSL
32+
"push_descriptors/hlsl/cube.vert.hlsl"
33+
"push_descriptors/hlsl/cube.frag.hlsl")
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
////
2+
- Copyright (c) 2020-2024, Arm Limited and Contributors
3+
-
4+
- SPDX-License-Identifier: Apache-2.0
5+
-
6+
- Licensed under the Apache License, Version 2.0 the "License";
7+
- you may not use this file except in compliance with the License.
8+
- You may obtain a copy of the License at
9+
-
10+
- http://www.apache.org/licenses/LICENSE-2.0
11+
-
12+
- Unless required by applicable law or agreed to in writing, software
13+
- distributed under the License is distributed on an "AS IS" BASIS,
14+
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
- See the License for the specific language governing permissions and
16+
- limitations under the License.
17+
-
18+
////
19+
20+
= Push Descriptors
21+
22+
ifdef::site-gen-antora[]
23+
TIP: The source for this sample can be found in the https://github.com/KhronosGroup/Vulkan-Samples/tree/main/samples/extensions/hpp_push_descriptors[Khronos Vulkan samples github repository].
24+
endif::[]
25+
26+
27+
*Extension*: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_push_descriptor[`VK_KHR_push_descriptor`]
28+
29+
Push descriptors apply the push constants concept to descriptor sets.
30+
Instead of creating per-object descriptor sets, this example passes descriptors at command buffer creation time.

0 commit comments

Comments
 (0)