GLES:Fix again compatibility for instanced rendering.

This commit is contained in:
xebra 2017-03-28 19:49:37 +09:00
parent 04e1e1a460
commit 73a898df2a
2 changed files with 4 additions and 6 deletions

View file

@ -300,9 +300,8 @@ void GPU_GLES::CheckGPUFeatures() {
features |= GPU_SUPPORTS_ANISOTROPY;
bool canUseInstanceID = gl_extensions.EXT_draw_instanced || gl_extensions.ARB_draw_instanced;
bool canDefInstanceID = gl_extensions.GLES3 || gl_extensions.EXT_gpu_shader4
|| (!gl_extensions.IsGLES && gl_extensions.VersionGEThan(3, 1)/*GLSL 1.4*/);
if (canUseInstanceID && canDefInstanceID)
bool canDefInstanceID = gl_extensions.IsGLES || gl_extensions.EXT_gpu_shader4;
bool instanceRendering = gl_extensions.GLES3 || (canUseInstanceID && canDefInstanceID);
features |= GPU_SUPPORTS_INSTANCE_RENDERING;
int maxVertexTextureImageUnits;

View file

@ -93,9 +93,8 @@ bool CheckSupportInstancedTessellationGLES() {
bool vertexTexture = maxVertexTextureImageUnits >= 3; // At least 3 for hardware tessellation
bool canUseInstanceID = gl_extensions.EXT_draw_instanced || gl_extensions.ARB_draw_instanced;
bool canDefInstanceID = gl_extensions.GLES3 || gl_extensions.EXT_gpu_shader4
|| (!gl_extensions.IsGLES && gl_extensions.VersionGEThan(3, 1)/*GLSL 1.4*/);
bool instanceRendering = canUseInstanceID && canDefInstanceID;
bool canDefInstanceID = gl_extensions.IsGLES || gl_extensions.EXT_gpu_shader4;
bool instanceRendering = gl_extensions.GLES3 || (canUseInstanceID && canDefInstanceID);
bool textureFloat = gl_extensions.ARB_texture_float || gl_extensions.OES_texture_float;