mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-12 19:18:20 +00:00
Fail when shader can't be compiled (fixes #4857)
This commit is contained in:
parent
e632859707
commit
3341fb13f9
|
@ -162,9 +162,15 @@ if(NOT FOUND_MATCHING_SHA256_FILE)
|
||||||
generate_shader_file("-DTW_QUAD_TEXTURED" "-DTW_PUSH_CONST" "${PROJECT_SOURCE_DIR}/data/shader/vulkan/quad.frag" "data/shader/vulkan/quad_push_textured.frag.spv")
|
generate_shader_file("-DTW_QUAD_TEXTURED" "-DTW_PUSH_CONST" "${PROJECT_SOURCE_DIR}/data/shader/vulkan/quad.frag" "data/shader/vulkan/quad_push_textured.frag.spv")
|
||||||
generate_shader_file("-DTW_QUAD_TEXTURED" "-DTW_PUSH_CONST" "${PROJECT_SOURCE_DIR}/data/shader/vulkan/quad.vert" "data/shader/vulkan/quad_push_textured.vert.spv")
|
generate_shader_file("-DTW_QUAD_TEXTURED" "-DTW_PUSH_CONST" "${PROJECT_SOURCE_DIR}/data/shader/vulkan/quad.vert" "data/shader/vulkan/quad_push_textured.vert.spv")
|
||||||
|
|
||||||
execute_process(${GLSLANG_VALIDATOR_COMMAND_LIST})
|
execute_process(${GLSLANG_VALIDATOR_COMMAND_LIST} RESULT_VARIABLE STATUS)
|
||||||
|
if(STATUS AND NOT STATUS EQUAL 0)
|
||||||
|
message(FATAL_ERROR "${GLSLANG_VALIDATOR_COMMAND_LIST} failed")
|
||||||
|
endif()
|
||||||
if(SPIRV_OPTIMIZER_PROGRAM_FOUND)
|
if(SPIRV_OPTIMIZER_PROGRAM_FOUND)
|
||||||
execute_process(${SPIRV_OPTIMIZER_COMMAND_LIST})
|
execute_process(${SPIRV_OPTIMIZER_COMMAND_LIST} RESULT_VARIABLE STATUS)
|
||||||
|
if(STATUS AND NOT STATUS EQUAL 0)
|
||||||
|
message(FATAL_ERROR "${SPIRV_OPTIMIZER_COMMAND_LIST} failed")
|
||||||
|
endif()
|
||||||
file(REMOVE ${GLSLANG_VALIDATOR_DELETE_LIST})
|
file(REMOVE ${GLSLANG_VALIDATOR_DELETE_LIST})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue