mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +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.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)
|
||||
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})
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in a new issue