Please confirm shader language version used in ARM GLES 3.1 emulator version 2.2? User guide attached with emulator(Mali OpenGL ES Emulator 2.2 User Guide.pdf, Page 19) suggests that it support 3.1
===========================================
Shading Language Version
For OpenGL ES 2.0 contexts, the Mali OpenGL ES Emulator supports up to version 1.2 of the OpenGL
ES Shader Language.
For OpenGL ES 3.0 contexts, OpenGL ES Shader Language version 3.0 is supported. For OpenGL ES
3.1 contexts, OpenGL ES Shader Language 3.1 is supported.
==================================================
Whereas when I compile shader with ;#version 310 es' as first line it gives following compilation error.
==========================================
Log START:
Error: 0:1: P0007: Language version '310' unknown, this compiler only supports up to version '300 es'Error: 0:1: P0007: Unexpected text found after #version directiveError: 0:3: L0001: Typename expected, found 'in'
Log END
================================================
Note: If current compiler supports upto version 300 es only, when can I expect next release with version '310 es'
Regards
Sunil
Hi Sunil,
Let's see. We are aware about some issues with 'mix' using uvec types.
As 'mix' comes with overloaded versions, can you point which particular one is troublesome in your case?
Is it possible you share the whole shader source that causes the problem?
cheers,
Adam
Hi Adam,
Built in function 'mix' is not working even for very basic example of mixing colors from two textures., it works if I remove outColor = mix(texture(tex1, texOut),texture(tex2,texOut),0.5f); by outColor = texture(tex1, texOut); It means problem lies with 'mix' function only.
----------------------------------------------
#version 310 es
precision highp float;
in vec3 vv3colour;
in vec2 texOut;
out vec4 outColor;
uniform sampler2D tex1;
uniform sampler2D tex2;
void main() {
outColor = mix(texture(tex1, texOut),texture(tex2,texOut),0.5f);
}
----------------------------------------
In another case where I can not share other share shader codes, I created sample fragment shader to reproduce. It seems mix(vec4,vec4,float) is not working and gives following error while linking
error C1115: unable to find compatible overloaded function "mix(vec3, vec3, float)" as shared in my above post.
-------------------------------------------------
outColor = mix(vec4(vv3colour,1.0),vec4(0.0,0.0,0.0,1.0),1.0);
--------------------------------------------------
Please let me know if it helps, and you can run above shaders successfully.
it was helpful indeed, and we have reproduction for the problem.
I confirm this is a valid issue for the Emulator and we'll prepare a fix for it.
The not-so-convenient and temporary workaround for the moment would be dropping the built-in and switching to custom mix(vec4,vec4,float) function in your shader, by declaring it:
-------------------
vec4 mix(vec4 x, vec4 y, float a) { return (1-a)*x + a*y; }
You can expect announcement on this thread when this issue gets resolution and the workaround is no longer necessary.
Thanks for your report,
Thanks again for your report.We have just released a new version of Mali OpenGL ES Emulator and the problems you have reported should now be fixed.You can download the latest Emulator 2.2.1 from http://malideveloper.arm.com/resources/tools/opengl-es-emulator/
Could you please try it and confirm that the problems are gone?
Thanks,
Jacek