You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CMakeLists.txt
+16-2Lines changed: 16 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ if(Vulkan_FOUND)
72
72
message(STATUS"Couldn't find slang Shader Compiler executable, make sure it is present in Vulkan SDK or add it manually via Vulkan_slang_EXECUTABLE cmake variable. Slang shaders won't be compiled.")
73
73
endif()
74
74
# glsl compiler
75
-
if(NOTVulkan_glslang_exe_FOUND)
75
+
if(NOTVulkan_glslc_exe_FOUND)
76
76
find_program(Vulkan_glslc_EXECUTABLE
77
77
NAMES glslc
78
78
HINTS
@@ -85,7 +85,21 @@ if(Vulkan_FOUND)
85
85
else()
86
86
message(STATUS"Couldn't find glslc Shader Compiler executable, make sure it is present in Vulkan SDK or add it manually via Vulkan_glslc_EXECUTABLE cmake variable. GLSL shaders won't be compiled.")
87
87
endif()
88
-
# glsl compiler
88
+
# spvasm compiler
89
+
if(NOT Vulkan_spirvas_exe_FOUND)
90
+
find_program(Vulkan_spirvas_EXECUTABLE
91
+
NAMES spirv-as
92
+
HINTS
93
+
"$ENV{VULKAN_SDK}/Bin"
94
+
"$ENV{VULKAN_SDK}/bin"
95
+
)
96
+
endif()
97
+
if(Vulkan_spirvas_EXECUTABLE)
98
+
message(STATUS"Found spirv-as Shader Compiler under ${Vulkan_spirvas_EXECUTABLE}")
99
+
else()
100
+
message(STATUS"Couldn't find spirv-as Shader Compiler executable, make sure it is present in Vulkan SDK or add it manually via Vulkan_spirvas_EXECUTABLE cmake variable. SPIR-V assembly shaders won't be compiled.")
Copy file name to clipboardExpand all lines: docs/build.adoc
+14-25Lines changed: 14 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,14 @@ Tracy is not currently enabled for Android builds. In the future, we may add sup
105
105
106
106
*Default:* `OFF`
107
107
108
+
=== VKB_SKIP_SLANG_SHADER_COMPILATION
109
+
110
+
By default, Slang shaders are compiled if a Slang compiler is found on the system. In cases where this is undesirable, set this to `OFF` to disable Slang shader compilation.
111
+
112
+
You can still select Slang as a shading language target for the samples since Slang shaders are included as precompiled SPIR-V files.
113
+
114
+
*Default:* `OFF`
115
+
108
116
== Quality Assurance
109
117
110
118
We use a small set of tools to provide a level of quality to the project.
@@ -174,33 +182,14 @@ Please make sure, when running any sample, that you either:
174
182
* Run Command Prompt or Visual Studio as administrator
175
183
____
176
184
177
-
`Step 1.` The following command will generate the VS project
178
-
179
-
----
180
-
cmake -G "Visual Studio 15 2017 Win64" -S . -Bbuild/windows
181
-
----
182
-
183
-
(Prior to CMake v3.13)
184
-
185
-
----
186
-
cmake -G "Visual Studio 15 2017 Win64" . -Bbuild/windows
187
-
----
188
-
189
-
(New in CMake v3.14.
190
-
Visual Studio 2019 must be installed)
191
-
192
-
----
193
-
cmake -G "Visual Studio 16 2019" -A x64 -S . -Bbuild/windows
194
-
----
195
-
196
-
(New in CMake v3.21.
197
-
Visual Studio 2022 must be installed)
185
+
`Step 1.` Generate the VS solution from the root of the repository
198
186
187
+
(For other VS versions please refer to https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#id15[CMake Generators])
199
188
----
200
189
cmake -G "Visual Studio 17 2022" -A x64 -S . -Bbuild/windows
201
190
----
202
191
203
-
Open the *vulkan_samples.sln* VS project inside build/windows and build with Ctrl-Shift-B. To run Vulkan Samples, use Visual Studio's Debug Properties selection and set the Debugging Command Arguments to --help. Click the "Local Windows Debugger" button and you should see the help output in the terminal. For convenience, the default setting is to run the hello_triangle sample; just edit that to your desired sample to run.
192
+
Open the *vulkan_samples.sln* or *vulkan_samples.slnx* VS solution inside *build/windows* and build with Ctrl-Shift-B. To run Vulkan Samples, use Visual Studio's Debug Properties selection and set the Debugging Command Arguments to --help. Click the "Local Windows Debugger" button and you should see the help output in the terminal. For convenience, the default setting is to run the hello_triangle sample; just edit that to your desired sample to run.
204
193
205
194
Alternatively, for command line builds use the steps below:
206
195
@@ -210,10 +199,10 @@ Alternatively, for command line builds use the steps below:
It is highly recommended to install https://d.android.com/studio[Android Studio] to build, run and trace the sample project. Building via Android Studio requires at least Ladybug 2024.2.1.
389
378
390
379
Android Studio uses the following plugins/tools to build samples:
0 commit comments