1
0
Fork 0

Merge pull request #5756 from vitor-k/gl_extensions

Check for OpenGL extensions
This commit is contained in:
bunnei 2021-04-23 22:33:21 -07:00 committed by GitHub
commit 71b8ddb8a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -61,6 +61,11 @@ RasterizerOpenGL::RasterizerOpenGL()
"Shadow might not be able to render because of unsupported OpenGL extensions."); "Shadow might not be able to render because of unsupported OpenGL extensions.");
} }
if (!GLAD_GL_ARB_copy_image) {
LOG_WARNING(Render_OpenGL,
"ARB_copy_image not supported. Some games might produce artifacts.");
}
// Clipping plane 0 is always enabled for PICA fixed clip plane z <= 0 // Clipping plane 0 is always enabled for PICA fixed clip plane z <= 0
state.clip_distance[0] = true; state.clip_distance[0] = true;
@ -772,7 +777,7 @@ bool RasterizerOpenGL::Draw(bool accelerate, bool is_indexed) {
} }
OGLTexture temp_tex; OGLTexture temp_tex;
if (need_duplicate_texture) { if (need_duplicate_texture && GLAD_GL_ARB_copy_image) {
// The game is trying to use a surface as a texture and framebuffer at the same time // The game is trying to use a surface as a texture and framebuffer at the same time
// which causes unpredictable behavior on the host. // which causes unpredictable behavior on the host.
// Making a copy to sample from eliminates this issue and seems to be fairly cheap. // Making a copy to sample from eliminates this issue and seems to be fairly cheap.

View File

@ -365,6 +365,10 @@ 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);