Merge pull request #5756 from vitor-k/gl_extensions
Check for OpenGL extensions
This commit is contained in:
commit
71b8ddb8a9
|
@ -61,6 +61,11 @@ RasterizerOpenGL::RasterizerOpenGL()
|
|||
"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
|
||||
state.clip_distance[0] = true;
|
||||
|
||||
|
@ -772,7 +777,7 @@ bool RasterizerOpenGL::Draw(bool accelerate, bool is_indexed) {
|
|||
}
|
||||
|
||||
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
|
||||
// which causes unpredictable behavior on the host.
|
||||
// Making a copy to sample from eliminates this issue and seems to be fairly cheap.
|
||||
|
|
|
@ -365,6 +365,10 @@ void ShaderDiskCache::SaveDecompiled(u64 unique_identifier,
|
|||
void ShaderDiskCache::SaveDump(u64 unique_identifier, GLuint program) {
|
||||
if (!IsUsable())
|
||||
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{};
|
||||
glGetProgramiv(program, GL_PROGRAM_BINARY_LENGTH, &binary_length);
|
||||
|
|
Loading…
Reference in New Issue