Skip to content
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a7fe342
Enabled SPIR-V 1.4 extension and use VK 1.1 if required
SaschaWillems Aug 30, 2025
daed1e4
Add slang shaders for
SaschaWillems Aug 30, 2025
f489823
Add slang shaders for
SaschaWillems Aug 30, 2025
6c93e2a
Add slang shaders for
SaschaWillems Aug 30, 2025
01f58f3
Fix copyright
SaschaWillems Aug 30, 2025
a2257b2
Add slang shaders for
SaschaWillems Aug 30, 2025
b02d478
Fix copyright
SaschaWillems Aug 30, 2025
ff46ff1
Add slang shaders for
SaschaWillems Aug 31, 2025
a18bddd
Add slang shaders for
SaschaWillems Aug 31, 2025
81989aa
Add slang shaders for
SaschaWillems Aug 31, 2025
a890f98
Add slang shaders for
SaschaWillems Aug 31, 2025
9f15aa2
Add slang shaders for
SaschaWillems Aug 31, 2025
3c1e5f4
Update reeadme for shaders
SaschaWillems Aug 31, 2025
eaf4100
Add slang shaders for
SaschaWillems Aug 31, 2025
5e81c99
Add slang shaders to hpp variant
SaschaWillems Aug 31, 2025
27acadf
Add slang shaders for
SaschaWillems Sep 1, 2025
432bc6d
Add slang shaders for
SaschaWillems Sep 2, 2025
07d6838
Add slang shaders for
SaschaWillems Sep 2, 2025
003f1e6
Add slang shaders for
SaschaWillems Sep 2, 2025
ef4a176
Add slang shaders for
SaschaWillems Sep 3, 2025
4e15a75
Add slang shaders for
SaschaWillems Sep 3, 2025
d16a26f
Add slang shaders for
SaschaWillems Sep 3, 2025
4909393
Fix copyright
SaschaWillems Sep 3, 2025
6eba1f6
Skip Slang offline compilation on MacOS/iOS when run through CI
SaschaWillems Sep 3, 2025
0bb37bc
Fix copyright
SaschaWillems Sep 3, 2025
e318e24
Add slang shaders for
SaschaWillems Sep 5, 2025
448cee6
Fix lighting for gshader_to_mshader
SaschaWillems Sep 6, 2025
1dc4d1a
Add slang shaders for
SaschaWillems Sep 6, 2025
ef15575
Fix descriptor indexing not properly displaying right side of screen …
SaschaWillems Sep 6, 2025
0f8d412
Add offline compiled SPIR-V files for slang shaders
SaschaWillems Sep 6, 2025
b26031d
Enalbe VK_KHR_Shader_Draw_Parameters when using Slang
SaschaWillems Sep 6, 2025
51a19ac
Add slang shaders for
SaschaWillems Sep 6, 2025
c12102d
Add slang shaders for
SaschaWillems Sep 7, 2025
830e264
Merge branch 'main' into shaders_09_2025
SaschaWillems Sep 8, 2025
7e88e7e
Recompile Slang shader with updated compiler version
SaschaWillems Sep 20, 2025
d22353b
Fix ambient factor
SaschaWillems Sep 20, 2025
c4bc0d6
Clamp specular contribution
SaschaWillems Sep 20, 2025
20a1c7d
Fix copyright
SaschaWillems Sep 20, 2025
0381a5e
Enable device extensions required for proper Slang support
SaschaWillems Sep 20, 2025
43b0091
Enable feature required when using Slang
SaschaWillems Sep 20, 2025
0750f19
Add CMake option to disable Slang shader compilation
SaschaWillems Sep 20, 2025
df272dd
Add note on Slang compiler requirements
SaschaWillems Sep 20, 2025
3e8347e
Fix normal calculation
SaschaWillems Sep 22, 2025
018f1b1
Check if required feature is supported and if not exit gracefully
SaschaWillems Oct 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 7 additions & 1 deletion bldsys/cmake/sample_helper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,13 @@ endif()
endif()

# Slang shader compilation
if(Vulkan_slang_EXECUTABLE AND DEFINED SHADERS_SLANG)
# Skip on MacOS/iOS due to CI/CD using potentially broken slang compiler versions from the SDK
# Might revisit once Slang shipped with the SDK is usable
set(SLANG_SKIP_COMPILE false)
if (($ENV{CI} MATCHES true) AND ((CMAKE_SYSTEM_NAME MATCHES "Darwin") OR (CMAKE_SYSTEM_NAME MATCHES "iOS")))
set(SLANG_SKIP_COMPILE true)
endif()
if(NOT SLANG_SKIP_COMPILE AND Vulkan_slang_EXECUTABLE AND DEFINED SHADERS_SLANG)
set(OUTPUT_FILES "")
set(SLANG_TARGET_NAME ${PROJECT_NAME}-SLANG)
foreach(SHADER_FILE_SLANG ${TARGET_SHADERS_SLANG})
Expand Down
12 changes: 12 additions & 0 deletions framework/vulkan_sample.h
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,18 @@ inline bool VulkanSample<bindingType>::prepare(const ApplicationOptions &options
}
}

// Shaders generated by Slang require a certain SPIR-V environment that can't be satisfied by Vulkan 1.0, so we need to expliclity up that to at least 1.1 and enable some required extensions
if (get_shading_language() == ShadingLanguage::SLANG)
{
if (api_version < VK_API_VERSION_1_1)
{
api_version = VK_API_VERSION_1_1;
}
add_device_extension(VK_KHR_SPIRV_1_4_EXTENSION_NAME);
add_device_extension(VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME);
add_device_extension(VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME);
}

#ifdef VKB_ENABLE_PORTABILITY
// VK_KHR_portability_subset must be enabled if present in the implementation (e.g on macOS/iOS with beta extensions enabled)
add_device_extension(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME, /*optional=*/true);
Expand Down
9 changes: 7 additions & 2 deletions samples/api/compute_nbody/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2024, Sascha Willems
# Copyright (c) 2019-2025, Sascha Willems
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -34,4 +34,9 @@ add_sample_with_tags(
"compute_nbody/hlsl/particle.vert.hlsl"
"compute_nbody/hlsl/particle.frag.hlsl"
"compute_nbody/hlsl/particle_calculate.comp.hlsl"
"compute_nbody/hlsl/particle_integrate.comp.hlsl")
"compute_nbody/hlsl/particle_integrate.comp.hlsl"
SHADER_FILES_SLANG
"compute_nbody/slang/particle.vert.slang"
"compute_nbody/slang/particle.frag.slang"
"compute_nbody/slang/particle_calculate.comp.slang"
"compute_nbody/slang/particle_integrate.comp.slang")
7 changes: 5 additions & 2 deletions samples/api/dynamic_uniform_buffers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2024, Sascha Willems
# Copyright (c) 2019-2025, Sascha Willems
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -30,4 +30,7 @@ add_sample_with_tags(
"dynamic_uniform_buffers/glsl/base.frag"
SHADER_FILES_HLSL
"dynamic_uniform_buffers/hlsl/base.vert.hlsl"
"dynamic_uniform_buffers/hlsl/base.frag.hlsl")
"dynamic_uniform_buffers/hlsl/base.frag.hlsl"
SHADER_FILES_SLANG
"dynamic_uniform_buffers/slang/base.vert.slang"
"dynamic_uniform_buffers/slang/base.frag.slang")
11 changes: 9 additions & 2 deletions samples/api/hdr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2024, Sascha Willems
# Copyright (c) 2019-2025, Sascha Willems
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -38,4 +38,11 @@ add_sample_with_tags(
"hdr/hlsl/bloom.vert.hlsl"
"hdr/hlsl/bloom.frag.hlsl"
"hdr/hlsl/gbuffer.vert.hlsl"
"hdr/hlsl/gbuffer.frag.hlsl")
"hdr/hlsl/gbuffer.frag.hlsl"
SHADER_FILES_SLANG
"hdr/slang/composition.vert.slang"
"hdr/slang/composition.frag.slang"
"hdr/slang/bloom.vert.slang"
"hdr/slang/bloom.frag.slang"
"hdr/slang/gbuffer.vert.slang"
"hdr/slang/gbuffer.frag.slang")
9 changes: 7 additions & 2 deletions samples/api/hpp_compute_nbody/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2022-2025, NVIDIA CORPORATION. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -34,4 +34,9 @@ add_sample_with_tags(
"compute_nbody/hlsl/particle.vert.hlsl"
"compute_nbody/hlsl/particle.frag.hlsl"
"compute_nbody/hlsl/particle_calculate.comp.hlsl"
"compute_nbody/hlsl/particle_integrate.comp.hlsl")
"compute_nbody/hlsl/particle_integrate.comp.hlsl"
SHADER_FILES_SLANG
"compute_nbody/slang/particle.vert.slang"
"compute_nbody/slang/particle.frag.slang"
"compute_nbody/slang/particle_calculate.comp.slang"
"compute_nbody/slang/particle_integrate.comp.slang")
7 changes: 5 additions & 2 deletions samples/api/hpp_dynamic_uniform_buffers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2021-2025, NVIDIA CORPORATION. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -30,4 +30,7 @@ add_sample_with_tags(
"dynamic_uniform_buffers/glsl/base.frag"
SHADER_FILES_HLSL
"dynamic_uniform_buffers/hlsl/base.vert.hlsl"
"dynamic_uniform_buffers/hlsl/base.frag.hlsl")
"dynamic_uniform_buffers/hlsl/base.frag.hlsl"
SHADER_FILES_SLANG
"dynamic_uniform_buffers/slang/base.vert.slang"
"dynamic_uniform_buffers/slang/base.frag.slang")
11 changes: 9 additions & 2 deletions samples/api/hpp_hdr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2022-2025, NVIDIA CORPORATION. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -38,4 +38,11 @@ add_sample_with_tags(
"hdr/hlsl/bloom.vert.hlsl"
"hdr/hlsl/bloom.frag.hlsl"
"hdr/hlsl/gbuffer.vert.hlsl"
"hdr/hlsl/gbuffer.frag.hlsl")
"hdr/hlsl/gbuffer.frag.hlsl"
SHADER_FILES_SLANG
"hdr/slang/composition.vert.slang"
"hdr/slang/composition.frag.slang"
"hdr/slang/bloom.vert.slang"
"hdr/slang/bloom.frag.slang"
"hdr/slang/gbuffer.vert.slang"
"hdr/slang/gbuffer.frag.slang")
11 changes: 9 additions & 2 deletions samples/api/hpp_instancing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2022-2025, NVIDIA CORPORATION. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -38,4 +38,11 @@ add_sample_with_tags(
"instancing/hlsl/planet.vert.hlsl"
"instancing/hlsl/planet.frag.hlsl"
"instancing/hlsl/starfield.vert.hlsl"
"instancing/hlsl/starfield.frag.hlsl")
"instancing/hlsl/starfield.frag.hlsl"
SHADER_FILES_SLANG
"instancing/slang/instancing.vert.slang"
"instancing/slang/instancing.frag.slang"
"instancing/slang/planet.vert.slang"
"instancing/slang/planet.frag.slang"
"instancing/slang/starfield.vert.slang"
"instancing/slang/starfield.frag.slang")
7 changes: 5 additions & 2 deletions samples/api/hpp_separate_image_sampler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2022-2025, NVIDIA CORPORATION. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -30,4 +30,7 @@ add_sample_with_tags(
"separate_image_sampler/glsl/separate_image_sampler.frag"
SHADER_FILES_HLSL
"separate_image_sampler/hlsl/separate_image_sampler.vert.hlsl"
"separate_image_sampler/hlsl/separate_image_sampler.frag.hlsl")
"separate_image_sampler/hlsl/separate_image_sampler.frag.hlsl"
SHADER_FILES_SLANG
"separate_image_sampler/slang/separate_image_sampler.vert.slang"
"separate_image_sampler/slang/separate_image_sampler.frag.slang")
11 changes: 9 additions & 2 deletions samples/api/hpp_terrain_tessellation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2022-2025, NVIDIA CORPORATION. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -38,4 +38,11 @@ add_sample_with_tags(
"terrain_tessellation/hlsl/terrain.tesc.hlsl"
"terrain_tessellation/hlsl/terrain.tese.hlsl"
"terrain_tessellation/hlsl/skysphere.vert.hlsl"
"terrain_tessellation/hlsl/skysphere.frag.hlsl")
"terrain_tessellation/hlsl/skysphere.frag.hlsl"
SHADER_FILES_SLANG
"terrain_tessellation/slang/terrain.vert.slang"
"terrain_tessellation/slang/terrain.frag.slang"
"terrain_tessellation/slang/terrain.tesc.slang"
"terrain_tessellation/slang/terrain.tese.slang"
"terrain_tessellation/slang/skysphere.vert.slang"
"terrain_tessellation/slang/skysphere.frag.slang")
7 changes: 5 additions & 2 deletions samples/api/hpp_texture_loading/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2021-2025, NVIDIA CORPORATION. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -30,4 +30,7 @@ add_sample_with_tags(
"texture_loading/glsl/texture.frag"
SHADER_FILES_HLSL
"texture_loading/hlsl/texture.vert.hlsl"
"texture_loading/hlsl/texture.frag.hlsl")
"texture_loading/hlsl/texture.frag.hlsl"
SHADER_FILES_SLANG
"texture_loading/slang/texture.vert.slang"
"texture_loading/slang/texture.frag.slang")
7 changes: 5 additions & 2 deletions samples/api/hpp_texture_mipmap_generation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2022-2025, NVIDIA CORPORATION. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -30,4 +30,7 @@ add_sample_with_tags(
"texture_mipmap_generation/glsl/texture.frag"
SHADER_FILES_HLSL
"texture_mipmap_generation/hlsl/texture.vert.hlsl"
"texture_mipmap_generation/hlsl/texture.frag.hlsl")
"texture_mipmap_generation/hlsl/texture.frag.hlsl"
SHADER_FILES_SLANG
"texture_mipmap_generation/slang/texture.vert.slang"
"texture_mipmap_generation/slang/texture.frag.slang")
11 changes: 9 additions & 2 deletions samples/api/hpp_timestamp_queries/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023-2024, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2023-2025, NVIDIA CORPORATION. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -38,4 +38,11 @@ add_sample_with_tags(
"hdr/hlsl/bloom.vert.hlsl"
"hdr/hlsl/bloom.frag.hlsl"
"hdr/hlsl/gbuffer.vert.hlsl"
"hdr/hlsl/gbuffer.frag.hlsl")
"hdr/hlsl/gbuffer.frag.hlsl"
SHADER_FILES_SLANG
"hdr/slang/composition.vert.slang"
"hdr/slang/composition.frag.slang"
"hdr/slang/bloom.vert.slang"
"hdr/slang/bloom.frag.slang"
"hdr/slang/gbuffer.vert.slang"
"hdr/slang/gbuffer.frag.slang")
11 changes: 9 additions & 2 deletions samples/api/instancing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2024, Sascha Willems
# Copyright (c) 2019-2025, Sascha Willems
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -38,4 +38,11 @@ add_sample_with_tags(
"instancing/hlsl/planet.vert.hlsl"
"instancing/hlsl/planet.frag.hlsl"
"instancing/hlsl/starfield.vert.hlsl"
"instancing/hlsl/starfield.frag.hlsl")
"instancing/hlsl/starfield.frag.hlsl"
SHADER_FILES_SLANG
"instancing/slang/instancing.vert.slang"
"instancing/slang/instancing.frag.slang"
"instancing/slang/planet.vert.slang"
"instancing/slang/planet.frag.slang"
"instancing/slang/starfield.vert.slang"
"instancing/slang/starfield.frag.slang")
7 changes: 5 additions & 2 deletions samples/api/separate_image_sampler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024, Sascha Willems
# Copyright (c) 2021-2025, Sascha Willems
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -30,4 +30,7 @@ add_sample_with_tags(
"separate_image_sampler/glsl/separate_image_sampler.frag"
SHADER_FILES_HLSL
"separate_image_sampler/hlsl/separate_image_sampler.vert.hlsl"
"separate_image_sampler/hlsl/separate_image_sampler.frag.hlsl")
"separate_image_sampler/hlsl/separate_image_sampler.frag.hlsl"
SHADER_FILES_SLANG
"separate_image_sampler/slang/separate_image_sampler.vert.slang"
"separate_image_sampler/slang/separate_image_sampler.frag.slang")
11 changes: 9 additions & 2 deletions samples/api/terrain_tessellation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2024, Sascha Willems
# Copyright (c) 2019-2025, Sascha Willems
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -38,4 +38,11 @@ add_sample_with_tags(
"terrain_tessellation/hlsl/terrain.tesc.hlsl"
"terrain_tessellation/hlsl/terrain.tese.hlsl"
"terrain_tessellation/hlsl/skysphere.vert.hlsl"
"terrain_tessellation/hlsl/skysphere.frag.hlsl")
"terrain_tessellation/hlsl/skysphere.frag.hlsl"
SHADER_FILES_SLANG
"terrain_tessellation/slang/terrain.vert.slang"
"terrain_tessellation/slang/terrain.frag.slang"
"terrain_tessellation/slang/terrain.tesc.slang"
"terrain_tessellation/slang/terrain.tese.slang"
"terrain_tessellation/slang/skysphere.vert.slang"
"terrain_tessellation/slang/skysphere.frag.slang")
7 changes: 5 additions & 2 deletions samples/api/texture_loading/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2024, Sascha Willems
# Copyright (c) 2019-2025, Sascha Willems
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -30,4 +30,7 @@ add_sample_with_tags(
"texture_loading/glsl/texture.frag"
SHADER_FILES_HLSL
"texture_loading/hlsl/texture.vert.hlsl"
"texture_loading/hlsl/texture.frag.hlsl")
"texture_loading/hlsl/texture.frag.hlsl"
SHADER_FILES_SLANG
"texture_loading/slang/texture.vert.slang"
"texture_loading/slang/texture.frag.slang")
7 changes: 5 additions & 2 deletions samples/api/texture_mipmap_generation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2024, Sascha Willems
# Copyright (c) 2019-2025, Sascha Willems
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -30,4 +30,7 @@ add_sample_with_tags(
"texture_mipmap_generation/glsl/texture.frag"
SHADER_FILES_HLSL
"texture_mipmap_generation/hlsl/texture.vert.hlsl"
"texture_mipmap_generation/hlsl/texture.frag.hlsl")
"texture_mipmap_generation/hlsl/texture.frag.hlsl"
SHADER_FILES_SLANG
"texture_mipmap_generation/slang/texture.vert.slang"
"texture_mipmap_generation/slang/texture.frag.slang")
11 changes: 9 additions & 2 deletions samples/api/timestamp_queries/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024, Sascha Willems
# Copyright (c) 2022-2025, Sascha Willems
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -38,4 +38,11 @@ add_sample_with_tags(
"hdr/hlsl/bloom.vert.hlsl"
"hdr/hlsl/bloom.frag.hlsl"
"hdr/hlsl/gbuffer.vert.hlsl"
"hdr/hlsl/gbuffer.frag.hlsl")
"hdr/hlsl/gbuffer.frag.hlsl"
SHADER_FILES_SLANG
"hdr/slang/composition.vert.slang"
"hdr/slang/composition.frag.slang"
"hdr/slang/bloom.vert.slang"
"hdr/slang/bloom.frag.slang"
"hdr/slang/gbuffer.vert.slang"
"hdr/slang/gbuffer.frag.slang")
12 changes: 8 additions & 4 deletions samples/extensions/buffer_device_address/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021, Arm Limited and Contributors
# Copyright (c) 2021-2025, Arm Limited and Contributors
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -26,6 +26,10 @@ add_sample_with_tags(
NAME "Buffer device address"
DESCRIPTION "Demonstrates use of buffer device address for flexible vertex attribute fetch"
SHADER_FILES_GLSL
"buffer_device_address/update_vbo.comp"
"buffer_device_address/render.vert"
"buffer_device_address/render.frag")
"buffer_device_address/glsl/update_vbo.comp"
"buffer_device_address/glsl/render.vert"
"buffer_device_address/glsl/render.frag"
SHADER_FILES_SLANG
"buffer_device_address/slang/update_vbo.comp.slang"
"buffer_device_address/slang/render.vert.slang"
"buffer_device_address/slang/render.frag.slang")
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void BufferDeviceAddress::create_compute_pipeline()
{
pipelines.compute_pipeline_layout = create_pipeline_layout(false);
VkComputePipelineCreateInfo info = vkb::initializers::compute_pipeline_create_info(pipelines.compute_pipeline_layout);
info.stage = load_shader("buffer_device_address/update_vbo.comp.spv", VK_SHADER_STAGE_COMPUTE_BIT);
info.stage = load_shader("buffer_device_address", "update_vbo.comp.spv", VK_SHADER_STAGE_COMPUTE_BIT);
VK_CHECK(vkCreateComputePipelines(get_device().get_handle(), VK_NULL_HANDLE, 1, &info, nullptr, &pipelines.compute_update_pipeline));
}

Expand Down Expand Up @@ -155,8 +155,8 @@ void BufferDeviceAddress::create_graphics_pipeline()
info.pStages = stages;
info.stageCount = 2;

stages[0] = load_shader("buffer_device_address/render.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
stages[1] = load_shader("buffer_device_address/render.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
stages[0] = load_shader("buffer_device_address", "render.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
stages[1] = load_shader("buffer_device_address", "render.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
VK_CHECK(vkCreateGraphicsPipelines(get_device().get_handle(), VK_NULL_HANDLE, 1, &info, nullptr, &pipelines.bindless_vbo_pipeline));
}

Expand Down
Loading
Loading