Skip to content

Commit

Permalink
Exclude HLSL shaders form MSVC build
Browse files Browse the repository at this point in the history
MSVC automatically compiles any HLSL shader using it's built-in DXC version with DX syntax, which obviously fails for VK HLSL shaders
  • Loading branch information
SaschaWillems committed Mar 1, 2024
1 parent 39e1a0f commit 8aa9573
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bldsys/cmake/sample_helper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ function(add_project)
endif()
if (SHADERS_HLSL)
source_group("\\Shaders\\hlsl" FILES ${SHADERS_HLSL})
# Disable automatic compilation of HLSL shaders for MSVC
set_source_files_properties(SOURCE ${SHADERS_HLSL} PROPERTIES VS_SETTINGS "ExcludedFromBuild=true")
endif()

if(${TARGET_TYPE} STREQUAL "Sample")
Expand Down

0 comments on commit 8aa9573

Please sign in to comment.