-
Bug
-
Resolution: Fixed
-
P3
-
fx2.0
-
opengl, macosx
On Mac
com/sun/prism/es2/glsl/Solid_TextureSecondPassLCD.frag
fails to compile with:
ERROR: 0:24: 'any' : no matching overloaded function found
ERROR: 0:24: '!' : wrong operand type no operation '!' exists that takes an operand of type const float (or there is no acceptable conversion)
ERROR: 0:24: '' : boolean expression expected
ERROR: 0:27: 'pow' : no matching overloaded function found
ERROR: 0:27: '=' : cannot convert from 'const float' to '3-component vector of float'
ERROR: 0:29: 'pow' : no matching overloaded function found
ERROR: 0:29: '=' : cannot convert from 'const float' to '3-component vector of float'
The root of the problem seems to be overloaded operators with seem to compile on some platforms but not on Mac and EGL.
I found this only by shoving all 176 "stock" shaders through the compile phase to see what broke on different platforms. Did not try it on windows, but did on Mac, Linux (nvidia drivers) and EGL.
changing the calls for any() and pow() to call the ones shown below seem to help,but I am a noobie at this so am not positive it does the right thing. Also I know that these fragment shaders are the output of a compiler so the change would seem to be needed there. Only Solid_TextureSecondPassLCD seemed to use any() and pow() in this way, so it might just be really broken to start.
decora-compiler/src/com/sun/scenario/effect/compiler/model/CoreSymbols.java
// bool any(float3 x)
declareFunction(BOOL, "any", FLOAT3, "x");
This does not match http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml
which says any(bvec) which is a boolean vector.
// <ftype> pow(<ftype> x, <ftype> y)
// <ftype> pow(<ftype> x, float y)
declareOverloadsMinMax("pow");
bool any3(vec3 val) {
return ((val.x > 0.0) || (val.y > 0.0) || (val.z > 0.0));
}
vec3 pow3(vec3 v, float p) {
vec3 ret;
ret.x = pow(v.x,p);
ret.y = pow(v.y,p);
ret.z = pow(v.z,p);
return ret;
}
com/sun/prism/es2/glsl/Solid_TextureSecondPassLCD.frag
fails to compile with:
ERROR: 0:24: 'any' : no matching overloaded function found
ERROR: 0:24: '!' : wrong operand type no operation '!' exists that takes an operand of type const float (or there is no acceptable conversion)
ERROR: 0:24: '' : boolean expression expected
ERROR: 0:27: 'pow' : no matching overloaded function found
ERROR: 0:27: '=' : cannot convert from 'const float' to '3-component vector of float'
ERROR: 0:29: 'pow' : no matching overloaded function found
ERROR: 0:29: '=' : cannot convert from 'const float' to '3-component vector of float'
The root of the problem seems to be overloaded operators with seem to compile on some platforms but not on Mac and EGL.
I found this only by shoving all 176 "stock" shaders through the compile phase to see what broke on different platforms. Did not try it on windows, but did on Mac, Linux (nvidia drivers) and EGL.
changing the calls for any() and pow() to call the ones shown below seem to help,but I am a noobie at this so am not positive it does the right thing. Also I know that these fragment shaders are the output of a compiler so the change would seem to be needed there. Only Solid_TextureSecondPassLCD seemed to use any() and pow() in this way, so it might just be really broken to start.
decora-compiler/src/com/sun/scenario/effect/compiler/model/CoreSymbols.java
// bool any(float3 x)
declareFunction(BOOL, "any", FLOAT3, "x");
This does not match http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml
which says any(bvec) which is a boolean vector.
// <ftype> pow(<ftype> x, <ftype> y)
// <ftype> pow(<ftype> x, float y)
declareOverloadsMinMax("pow");
bool any3(vec3 val) {
return ((val.x > 0.0) || (val.y > 0.0) || (val.z > 0.0));
}
vec3 pow3(vec3 v, float p) {
vec3 ret;
ret.x = pow(v.x,p);
ret.y = pow(v.y,p);
ret.z = pow(v.z,p);
return ret;
}
- relates to
-
JDK-8128330 JSL should not support pow(float3, float)
- Resolved