mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Improve extension checks
This commit is contained in:
parent
60cd646bd0
commit
2075842d31
|
@ -27,18 +27,19 @@ void GLInfo::init() {
|
||||||
renderer = Renderer::Adreno;
|
renderer = Renderer::Adreno;
|
||||||
LOG(LOG_VERBOSE, "OpenGL renderer: %s\n", strRenderer);
|
LOG(LOG_VERBOSE, "OpenGL renderer: %s\n", strRenderer);
|
||||||
|
|
||||||
|
int numericVersion = majorVersion * 10 + minorVersion;
|
||||||
if (isGLES2) {
|
if (isGLES2) {
|
||||||
imageTextures = false;
|
imageTextures = false;
|
||||||
msaa = false;
|
msaa = false;
|
||||||
} else if (isGLESX) {
|
} else if (isGLESX) {
|
||||||
imageTextures = (majorVersion * 10 + minorVersion >= 31) && (glBindImageTexture != nullptr);
|
imageTextures = (numericVersion >= 31) && (glBindImageTexture != nullptr);
|
||||||
msaa = majorVersion * 10 + minorVersion >= 31;
|
msaa = numericVersion >= 31;
|
||||||
} else {
|
} else {
|
||||||
imageTextures = ((majorVersion * 10 + minorVersion >= 43) || (Utils::isExtensionSupported("GL_ARB_shader_image_load_store") && Utils::isExtensionSupported("GL_ARB_compute_shader"))) && (glBindImageTexture != nullptr);
|
imageTextures = ((numericVersion >= 43) || (Utils::isExtensionSupported("GL_ARB_shader_image_load_store") && Utils::isExtensionSupported("GL_ARB_compute_shader"))) && (glBindImageTexture != nullptr);
|
||||||
msaa = true;
|
msaa = true;
|
||||||
}
|
}
|
||||||
bufferStorage = Utils::isExtensionSupported("GL_ARB_buffer_storage") || Utils::isExtensionSupported("GL_EXT_buffer_storage");
|
bufferStorage = (!isGLESX && (numericVersion >= 44)) || Utils::isExtensionSupported("GL_ARB_buffer_storage") || Utils::isExtensionSupported("GL_EXT_buffer_storage");
|
||||||
texStorage = Utils::isExtensionSupported("GL_ARB_texture_storage") || Utils::isExtensionSupported("GL_EXT_texture_storage");
|
texStorage = (isGLESX && (numericVersion >= 30)) || (!isGLESX && numericVersion >= 42) || Utils::isExtensionSupported("GL_ARB_texture_storage") || Utils::isExtensionSupported("GL_EXT_texture_storage");
|
||||||
|
|
||||||
shaderStorage = false;
|
shaderStorage = false;
|
||||||
if (config.generalEmulation.enableShadersStorage != 0) {
|
if (config.generalEmulation.enableShadersStorage != 0) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user