Question

So, I have a PC with an nvidia geforce gtx 580, a mac with some ATI card and then a notebook with a geforce gtx 680M.

The vertex shader compiles on the 580 and the ATI, but not on the gtx 680M.

The error is quite interesting (not): ERROR: 0:18: '': syntax error syntax error

That line of code is: int vIdStep = gl_VertexID % 9;

I have tried to delete all the whitespaces, add extra empty lines, move the line around, ... nothing works.

I use gl_VertexId in other shaders that compile without problems. Only this one with the % in it won't compile on the 680M.

What is this? Anyone else has this experience? What can I do about it?

EDIT: By the way: this solves the problem, but it's a terrible sollution IMO and I really want a better one: int vIdStep = int(mod(float(gl_VertexID), 9));

Was it helpful?

Solution

Ok, I finally found out what the problem was. My portable computer has a hybrid video adapter: Intel/Nvidia. For some reason, even in fullscreen, the driver kept choosing the Intel adapter on my tests. Therefor... it's a bug in the Intel driver.

You can't use % on glsl on Intel HD Graphics 4000 at this moment. I will now submit the bug to them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top