oizma / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

GLSL, precision statement in vertex shader is invalid? #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add the line "precision highp float;" to a VERTEX shader.
2. Compile

What is the expected output? 

It should not compile.

What do you see instead?

It compiles.

It's not 100% clear to me that it should not compile but the issue is the 
statement makes it through to the GL driver and depending on the driver it 
fails to compile.

Original issue reported on code.google.com by g...@chromium.org on 2 Aug 2010 at 5:22

GoogleCodeExporter commented 9 years ago

Original comment by alokp@chromium.org on 5 Aug 2010 at 8:31

GoogleCodeExporter commented 9 years ago
According to the GLSL ES specs default precision qualifiers are valid even for 
vertex shaders. So we should not be rejecting such shaders.

But I do not understand what you mean by "the statement makes it through to the 
GL driver". The translator strips out all precision qualifiers so it should not 
make it through to the GL driver. Is this what you meant or I am missing 
something?

Original comment by alokp@chromium.org on 5 Aug 2010 at 9:15

GoogleCodeExporter commented 9 years ago
Sorry, I should have saved more details. I don't know how to reproduce this.

The issue was I had a shader that was working on some system but not on 
another. The error was related to that statement in a vertex shader.  

I guess ignore this until I can figure out how to reproduce it. Maybe I didn't 
have the translator on or something.

Original comment by g...@google.com on 7 Aug 2010 at 6:30

GoogleCodeExporter commented 9 years ago

Original comment by alokp@chromium.org on 9 Aug 2010 at 5:18