Permalink
Browse files

GLES: Improve HW tess requirements validation.

We also need texelFetch of some kind, seen in reporting.
  • Loading branch information...
unknownbrackets committed Dec 22, 2017
1 parent fe45a05 commit 510f9652a0a7c5286823635a3313bc965240857a
Showing with 4 additions and 2 deletions.
  1. +2 −1 GPU/GLES/GPU_GLES.cpp
  2. +2 −1 UI/GameSettingsScreen.cpp
View
@@ -175,7 +175,8 @@ GPU_GLES::GPU_GLES(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
if (g_Config.bHardwareTessellation) {
// Disable hardware tessellation if device is unsupported.
if (!gstate_c.SupportsAll(GPU_SUPPORTS_INSTANCE_RENDERING | GPU_SUPPORTS_VERTEX_TEXTURE_FETCH | GPU_SUPPORTS_TEXTURE_FLOAT)) {
bool hasTexelFetch = gl_extensions.GLES3 || (!gl_extensions.IsGLES && gl_extensions.VersionGEThan(3, 3, 0)) || gl_extensions.EXT_gpu_shader4;
if (!gstate_c.SupportsAll(GPU_SUPPORTS_INSTANCE_RENDERING | GPU_SUPPORTS_VERTEX_TEXTURE_FETCH | GPU_SUPPORTS_TEXTURE_FLOAT) || !hasTexelFetch) {
// TODO: Check unsupported device name list.(Above gpu features are supported but it has issues with weak gpu, memory, shader compiler etc...)
g_Config.bHardwareTessellation = false;
ERROR_LOG(G3D, "Hardware Tessellation is unsupported, falling back to software tessellation");
@@ -99,8 +99,9 @@ bool CheckSupportInstancedTessellationGLES() {
bool instanceRendering = gl_extensions.GLES3 || (canUseInstanceID && canDefInstanceID);
bool textureFloat = gl_extensions.ARB_texture_float || gl_extensions.OES_texture_float;
bool hasTexelFetch = gl_extensions.GLES3 || (!gl_extensions.IsGLES && gl_extensions.VersionGEThan(3, 3, 0)) || gl_extensions.EXT_gpu_shader4;
return instanceRendering && vertexTexture && textureFloat;
return instanceRendering && vertexTexture && textureFloat && hasTexelFetch;
#endif
}

0 comments on commit 510f965

Please sign in to comment.