Error loading tessellation shaders

Started by Daslee, September 02, 2014, 15:04:14

Previous topic - Next topic

Daslee

Hello. I have a quick question. Why do I get this error:

Quote(0) : error C0000: syntax error, unexpected $end at token "<EOF>"

while loading tessellation shader? While loading vertex/geometry/fragment shaders I do not get this error, even all of the shaders are loading in the same way..

quew8

I expect because the parser reached the end of the file when it was expecting something else. Check you've paired all your braces and brackets and that you haven't missed something.

Daslee

I don't think that my code is wrong. For example, here is tessellation control shader source (and this one is also throwing EOF error):

layout(vertices = 4) out;

uniform int NumSegments;
uniform int NumStripes;

void main()
{
	gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
	gl_TessLevelOuter[0] = float(NumStripes);
	gl_TessLevelOuter[1] = float(NumSegments);
}

Cornix

Have you tried putting a newline at the end? I know this sounds stupid, but some parsers want it this way.

Daslee

Quote from: Cornix on September 02, 2014, 19:46:17
Have you tried putting a newline at the end? I know this sounds stupid, but some parsers want it this way.

I can't test it now, because I'm on windows now (programming only on linux), tomorrow I'll try it. But I don't think so, that this is the problem, because why vertex/geometry/fragment shaders are compiling successfully without newline at the end?  :-\

quew8

There are occasionally driver bugs with this sort of thing. Try searching the error in Google along with your card manufacturer's name / video card name.