Коммит
dd39d36726
|
@ -128,12 +128,21 @@ if (${PYTHONINTERP_FOUND})
|
|||
add_test(NAME spirv-cross-test
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders)
|
||||
add_test(NAME spirv-cross-test-no-opt
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders-no-opt)
|
||||
add_test(NAME spirv-cross-test-metal
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --metal
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders-msl)
|
||||
add_test(NAME spirv-cross-test-metal-no-opt
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --metal
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders-msl-no-opt)
|
||||
add_test(NAME spirv-cross-test-hlsl
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --hlsl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders-hlsl)
|
||||
add_test(NAME spirv-cross-test-hlsl-no-opt
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --hlsl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders-hlsl-no-opt)
|
||||
add_test(NAME spirv-cross-test-opt
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --opt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders)
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
environment:
|
||||
matrix:
|
||||
- GENERATOR: "Visual Studio 12 2013 Win64"
|
||||
CONFIG: Debug
|
||||
|
||||
- GENERATOR: "Visual Studio 12 2013 Win64"
|
||||
CONFIG: Release
|
||||
|
||||
- GENERATOR: "Visual Studio 14 2015 Win64"
|
||||
CONFIG: Debug
|
||||
|
||||
- GENERATOR: "Visual Studio 14 2015 Win64"
|
||||
CONFIG: Release
|
||||
|
||||
- GENERATOR: "Visual Studio 12 2013"
|
||||
CONFIG: Debug
|
||||
|
||||
- GENERATOR: "Visual Studio 12 2013"
|
||||
CONFIG: Release
|
||||
|
||||
- GENERATOR: "Visual Studio 14 2015"
|
||||
CONFIG: Debug
|
||||
|
||||
- GENERATOR: "Visual Studio 14 2015"
|
||||
CONFIG: Release
|
||||
|
||||
build_script:
|
||||
- git submodule update --init
|
||||
- cmake "-G%GENERATOR%" -H. -B_builds
|
||||
- cmake --build _builds --config "%CONFIG%"
|
|
@ -140,16 +140,20 @@ def shader_to_win_path(shader):
|
|||
|
||||
return shader
|
||||
|
||||
ignore_fxc = False
|
||||
def validate_shader_hlsl(shader):
|
||||
subprocess.check_call(['glslangValidator', '-e', 'main', '-D', '--target-env', 'vulkan1.1', '-V', shader])
|
||||
is_no_fxc = '.nofxc.' in shader
|
||||
if (not force_no_external_validation) and (not is_no_fxc):
|
||||
global ignore_fxc
|
||||
if (not ignore_fxc) and (not force_no_external_validation) and (not is_no_fxc):
|
||||
try:
|
||||
win_path = shader_to_win_path(shader)
|
||||
subprocess.check_call(['fxc', '-nologo', shader_model_hlsl(shader), win_path])
|
||||
except OSError as oe:
|
||||
if (oe.errno != os.errno.ENOENT): # Ignore not found errors
|
||||
raise
|
||||
else:
|
||||
ignore_fxc = True
|
||||
except subprocess.CalledProcessError:
|
||||
print('Failed compiling HLSL shader:', shader, 'with FXC.')
|
||||
sys.exit(1)
|
||||
|
|
Загрузка…
Ссылка в новой задаче