Skip to content

Commit 2048d61

Browse files
author
ssjia
committed
Update
[ghstack-poisoned]
1 parent f1ed16a commit 2048d61

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

backends/vulkan/cmake/ShaderLibrary.cmake

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,12 @@ function(gen_vulkan_shader_lib_cpp shaders_path)
5050
set(VULKAN_SHADERGEN_OUT_PATH ${CMAKE_BINARY_DIR}/vulkan_compute_shaders)
5151

5252
set(GEN_SPV_ARGS "--optimize")
53-
if(DEFINED ENV{ETVK_USING_SWIFTSHADER}
54-
and (("$ENV{ETVK_USING_SWIFTSHADER}" strequal "1")
55-
or ("$ENV{ETVK_USING_SWIFTSHADER}" strequal "True"))
56-
)
57-
list(APPEND GEN_SPV_ARGS "--replace-u16vecn")
53+
if(DEFINED ENV{ETVK_USING_SWIFTSHADER})
54+
if("$ENV{ETVK_USING_SWIFTSHADER}" STREQUAL "1"
55+
OR "$ENV{ETVK_USING_SWIFTSHADER}" STREQUAL "True"
56+
)
57+
list(APPEND GEN_SPV_ARGS "--replace-u16vecn")
58+
endif()
5859
endif()
5960

6061
add_custom_command(

0 commit comments

Comments
 (0)