1
0
mirror of https://github.com/citra-emu/citra.git synced 2024-12-27 21:50:08 +00:00

video_core: Disable disk shader cache when GL_ARB_get_program_binary is unsupported ()

This commit is contained in:
SachinVin 2021-10-03 18:57:34 +05:30 committed by GitHub
parent 7bf0f10305
commit d4e85e2bb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions
src/video_core/renderer_opengl

View File

@ -365,10 +365,6 @@ void ShaderDiskCache::SaveDecompiled(u64 unique_identifier,
void ShaderDiskCache::SaveDump(u64 unique_identifier, GLuint program) { void ShaderDiskCache::SaveDump(u64 unique_identifier, GLuint program) {
if (!IsUsable()) if (!IsUsable())
return; return;
if (!GLAD_GL_ARB_get_program_binary) {
LOG_WARNING(Render_OpenGL, "ARB_get_program_binary is not supported. Problems may occur if "
"use_disk_shader_cache is ON.");
}
GLint binary_length{}; GLint binary_length{};
glGetProgramiv(program, GL_PROGRAM_BINARY_LENGTH, &binary_length); glGetProgramiv(program, GL_PROGRAM_BINARY_LENGTH, &binary_length);

View File

@ -442,6 +442,12 @@ void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading,
"Cannot load disk cache as separate shader programs are unsupported!"); "Cannot load disk cache as separate shader programs are unsupported!");
return; return;
} }
if (!GLAD_GL_ARB_get_program_binary) {
LOG_ERROR(Render_OpenGL,
"Cannot load disk cache as ARB_get_program_binary is not supported!");
return;
}
auto& disk_cache = impl->disk_cache; auto& disk_cache = impl->disk_cache;
const auto transferable = disk_cache.LoadTransferable(); const auto transferable = disk_cache.LoadTransferable();
if (!transferable) { if (!transferable) {