mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
4858: Fail when shader can't be compiled (fixes #4857) r=Jupeyy a=def- <!-- What is the motivation for the changes of this pull request --> ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) 4859: Fix Debian 9 compilation r=Jupeyy a=def- <!-- What is the motivation for the changes of this pull request --> ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) 4860: Only try exe on Windows r=Jupeyy a=def- <!-- What is the motivation for the changes of this pull request --> ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Dennis Felsing <dennis@felsin9.de>
This commit is contained in:
commit
f95cc6cb11
|
@ -14,7 +14,7 @@ if(NOT GLSLANG_VALIDATOR_PROGRAM)
|
|||
|
||||
if(EXISTS ${GLSLANG_VALIDATOR_PROGRAM})
|
||||
set(GLSLANG_VALIDATOR_PROGRAM_FOUND TRUE)
|
||||
elseif(${TARGET_CPU_ARCHITECTURE} STREQUAL "x86_64")
|
||||
elseif(TARGET_OS STREQUAL "windows" AND ${TARGET_CPU_ARCHITECTURE} STREQUAL "x86_64")
|
||||
set(GLSLANG_VALIDATOR_PROGRAM "${PROJECT_SOURCE_DIR}/ddnet-libs/vulkan/windows/lib64/glslangValidator.exe")
|
||||
if(EXISTS ${GLSLANG_VALIDATOR_PROGRAM})
|
||||
set(GLSLANG_VALIDATOR_PROGRAM_FOUND TRUE)
|
||||
|
@ -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()
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ CGraphicsBackend_Threaded::CGraphicsBackend_Threaded()
|
|||
{
|
||||
m_pBuffer = nullptr;
|
||||
m_pProcessor = nullptr;
|
||||
m_Shutdown = true;
|
||||
m_BufferInProcess.store(false, std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ private:
|
|||
std::mutex m_BufferSwapMutex;
|
||||
std::condition_variable m_BufferSwapCond;
|
||||
CCommandBuffer *m_pBuffer;
|
||||
std::atomic_bool m_Shutdown = true;
|
||||
std::atomic_bool m_Shutdown;
|
||||
bool m_Started = false;
|
||||
std::atomic_bool m_BufferInProcess;
|
||||
void *m_Thread;
|
||||
|
|
Loading…
Reference in a new issue