KroMignon / angleproject

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

gl_PointCoord misuse hits assert in translator #943

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Compile this shader using the D3D11 renderer:

----------------------------------------------------------------------
Fragment Shader
----------------------------------------------------------------------

precision highp float;
varying vec4 v0;

void main() 
{ 
    vec4 retColor = vec4(0,0,0,0);
    retColor += vec4(0.0, 0.0, 0.0, 0.0);
    retColor += vec4(vec2(0.0, 0.0), 0.0, 0.0);
    retColor += vec4(vec3(0.0, 0.0, 0.0), 0.0);
    retColor += v0 + vec4(0.0, 0.0, 0.0, 0.0);
    gl_FragColor = retColor + gl_FragCoord + gl_PointCoord; 
}

It hits this assert:

libGLESv2.dll!_wassert(const wchar_t * expr=0x0f856390, const wchar_t * 
filename=0x0f8f7a28, unsigned int lineno=422)
libGLESv2.dll!getQualifierString(TQualifier q=EvqPointCoord)
libGLESv2.dll!TType::getQualifierString()
libGLESv2.dll!TType::getCompleteString()
libGLESv2.dll!TIntermTyped::getCompleteString()
libGLESv2.dll!TParseContext::addBinaryMath(TOperator op=EOpAdd, TIntermTyped * 
left=0x04a4c4e4, TIntermTyped * right=0x04a4c714, const TSourceLoc & loc={...})
libGLESv2.dll!yyparse(TParseContext * context=0x0080f288, void * 
scanner=0x048e9340)
libGLESv2.dll!glslang_parse(TParseContext * context=0x0080f288)
libGLESv2.dll!PaParseStrings(unsigned int count=1, const char * const * 
string=0x0080f4c4, const int * length=0x00000000, TParseContext * 
context=0x0080f288)
libGLESv2.dll!TCompiler::compileTreeImpl(const char * const * 
shaderStrings=0x0080f4c4, unsigned int numStrings=1, int compileOptions=12)
libGLESv2.dll!TCompiler::compile(const char * const * shaderStrings=0x0080f4c4, 
unsigned int numStrings=1, int compileOptions=12)
libGLESv2.dll!ShCompile(void * const handle=0x00a9ea88, const char * const * 
shaderStrings=0x0080f4c4, unsigned int numStrings=1, int compileOptions=12)
libGLESv2.dll!rx::ShaderD3D::compileToHLSL(void * compiler=0x00a9ea88, const 
std::basic_string<char,std::char_traits<char>,std::allocator<char> > & 
source={...})
libGLESv2.dll!rx::ShaderD3D::compile(gl::Compiler * compiler=0x04969ba8, const 
std::basic_string<char,std::char_traits<char>,std::allocator<char> > & 
source={...})
libGLESv2.dll!gl::Shader::compile(gl::Compiler * compiler=0x04969ba8)
libGLESv2.dll!gl::CompileShader(unsigned int shader=3)
libGLESv2.dll!glCompileShader(unsigned int shader=3)

Original issue reported on code.google.com by aukin...@microsoft.com on 10 Mar 2015 at 6:00