mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01:00
Fix bug where we tried to set aniso even if unsupported. Fixes #9377
This commit is contained in:
1 parent
147d311acb
commit
f95459ab0d
4 files changed
+7
-2
No files matched your search
@@ -594,7 +594,8 @@ void GPU_GLES::CheckGPUFeatures() {
|
||||
if (gl_extensions.GLES3 || !gl_extensions.IsGLES)
|
||||
features |= GPU_SUPPORTS_TEXTURE_LOD_CONTROL;
|
||||
|
||||
features |= GPU_SUPPORTS_ANISOTROPY;
|
||||
if (gl_extensions.EXT_texture_filter_anisotropic)
|
||||
features |= GPU_SUPPORTS_ANISOTROPY;
|
||||
|
||||
if (gl_extensions.GLES3 || gl_extensions.EXT_gpu_shader4
|
||||
|| (!gl_extensions.IsGLES && gl_extensions.VersionGEThan(3, 1)/*GLSL 1.4*/))
|
||||
|
||||
@@ -709,7 +709,9 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry, bool replaceImag
|
||||
if (gstate_c.Supports(GPU_SUPPORTS_ANISOTROPY)) {
|
||||
int aniso = 1 << g_Config.iAnisotropyLevel;
|
||||
float anisotropyLevel = (float) aniso > maxAnisotropyLevel ? maxAnisotropyLevel : (float) aniso;
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropyLevel);
|
||||
if (anisotropyLevel > 1.0f) {
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropyLevel);
|
||||
}
|
||||
}
|
||||
|
||||
// This will rebind it, but that's okay.
|
||||
|
||||
@@ -277,6 +277,7 @@ void CheckGLExtensions() {
|
||||
gl_extensions.ARB_copy_image = strstr(extString, "GL_ARB_copy_image") != 0;
|
||||
gl_extensions.ARB_vertex_array_object = strstr(extString, "GL_ARB_vertex_array_object") != 0;
|
||||
gl_extensions.ARB_texture_float = strstr(extString, "GL_ARB_texture_float") != 0;
|
||||
gl_extensions.EXT_texture_filter_anisotropic = strstr(extString, "GL_EXT_texture_filter_anisotropic") != 0;
|
||||
|
||||
if (gl_extensions.IsGLES) {
|
||||
gl_extensions.OES_texture_npot = strstr(extString, "GL_OES_texture_npot") != 0;
|
||||
|
||||
@@ -71,6 +71,7 @@ struct GLExtensions {
|
||||
bool EXT_blend_minmax;
|
||||
bool EXT_framebuffer_object;
|
||||
bool EXT_copy_image;
|
||||
bool EXT_texture_filter_anisotropic;
|
||||
bool PBO_EXT;
|
||||
|
||||
// NV
|
||||
|
||||
Reference in new issue
Block a user