Archived issue #0032238
Visualization, TKOpenGl - GLSL compilation errors when using ANGLE (OpenGL ES 2.0) with disabled highp
Description
Disabling OpenGl_Context::hasHighp leads to the following errors:
The reason is that Declarations.glsl declares matrix uniforms for both Vertex and Fragment shaders. And when highp is unsupported by hardware (very old OpenGL ES 2.0), the precision qualifiers of the same uniform become different.
In practice, the uniform is used only within vertex shader, so that Android hardware tolerated such syntax - unused uniform variables have been removed from Fragment shader before validation.
Issue happened only within Phong GLSL program, which has done matrix calculations in Framment shader until #0032042.
ANGLE library is, however, more strict about GLSL syntax and explicitly rejects such shaders.
TKOpenGl | Type: Error | ID: 0 | Severity: High | Message: Failed to link program object [occt_unlit0000]! Linker log: Precisions for uniform 'occWorldViewMatrix' differ between vertex and fragment shaders
The reason is that Declarations.glsl declares matrix uniforms for both Vertex and Fragment shaders. And when highp is unsupported by hardware (very old OpenGL ES 2.0), the precision qualifiers of the same uniform become different.
In practice, the uniform is used only within vertex shader, so that Android hardware tolerated such syntax - unused uniform variables have been removed from Fragment shader before validation.
Issue happened only within Phong GLSL program, which has done matrix calculations in Framment shader until #0032042.
ANGLE library is, however, more strict about GLSL syntax and explicitly rejects such shaders.
Steps to reproduce
pload MODELING VISUALIZATION vdriver -load GLES vcaps -maxVersion 2 0 # there is no such flag yet #vcaps -highp 0 vinit View1
Public activity
No public notes
Participants are labeled by their role within this record.
Related records