Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:tohur
pcsx2-git
pcsx2-shaderc-compatibility.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pcsx2-shaderc-compatibility.patch of Package pcsx2-git
diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 6177f31ed..e5a1716d6 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -638,6 +638,7 @@ if(USE_VULKAN) GS/Renderers/Vulkan/VKSwapChain.h ) target_link_libraries(PCSX2_FLAGS INTERFACE vulkan-headers) + target_link_libraries(PCSX2_FLAGS INTERFACE ${SHADERC_SHAREDLIB}) target_include_directories(PCSX2_FLAGS INTERFACE ${SHADERC_INCLUDE_DIR}) endif() diff --git a/pcsx2/GS/Renderers/Vulkan/VKShaderCache.cpp b/pcsx2/GS/Renderers/Vulkan/VKShaderCache.cpp index d4df38661..8b0cd6da6 100644 --- a/pcsx2/GS/Renderers/Vulkan/VKShaderCache.cpp +++ b/pcsx2/GS/Renderers/Vulkan/VKShaderCache.cpp @@ -114,6 +114,7 @@ static void FillPipelineCacheHeader(VK_PIPELINE_CACHE_HEADER* header) X(shaderc_result_get_length) \ X(shaderc_result_get_num_warnings) \ X(shaderc_result_get_bytes) \ + X(shaderc_result_get_compilation_status) \ X(shaderc_result_get_error_message) // TODO: NOT thread safe, yet. @@ -221,10 +222,11 @@ std::optional<VKShaderCache::SPIRVCodeVector> VKShaderCache::CompileShaderToSPV( dyn_shaderc::shaderc_compile_options_set_optimization_level( options, debug ? shaderc_optimization_level_zero : shaderc_optimization_level_performance); - shaderc_compilation_result_t result; - const shaderc_compilation_status status = dyn_shaderc::shaderc_compile_into_spv( - dyn_shaderc::s_compiler, source.data(), source.length(), static_cast<shaderc_shader_kind>(stage), "source", - "main", options, &result); + const shaderc_compilation_result_t result = + dyn_shaderc::shaderc_compile_into_spv(dyn_shaderc::s_compiler, source.data(), source.length(), + static_cast<shaderc_shader_kind>(stage), "source", "main", options); + const shaderc_compilation_status status = + result ? shaderc_result_get_compilation_status(result) : shaderc_compilation_status_internal_error; if (status != shaderc_compilation_status_success) { const std::string_view errors(result ? dyn_shaderc::shaderc_result_get_error_message(result) :
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor