revel8n / glfx

Automatically exported from code.google.com/p/glfx
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Unable to compile the test shaders #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When trying to compile the test shaders with the given test code in glfxc.cpp i 
always get errors while compiling.

For example the "simple_technique.glsl" shader throws the error 

"Status: VSmain shader compiled with errors
Compilation details for VSmain shader:
Vertex shader failed to compile with the following errors:
ERROR: 0:11: error(#181) Cannot be used with a structure: in
ERROR: error(#273) 1 compilation errors.  No code generated

Status: FSmain shader compiled without errors
Compilation details for FSmain shader:

Status: Link failed
Linkage details:
Vertex shader(s) were not successfully compiled before glLinkProgram() was 
called.  Link failed. 

Errors in shader compilation"

I tried all test shaders and only the null_technique.glsl compiled correctly. 
Might this be a problem with drivers?

I'm running on a Radeon HD 6950 with 13.4 drivers.

Original issue reported on code.google.com by freakyma...@web.de on 31 Aug 2013 at 10:31

GoogleCodeExporter commented 9 years ago
The problem is that the tests, which are from OGLDev, use structs for vertex 
shader attributes. This is not spec compliant.
While NVIDIA accepts this syntax, it's still wrong, and your driver is right by 
refusing to use it.
In your code just don't use structs as inputs for vertex shaders, and it should 
work.

Original comment by max.snif...@gmail.com on 1 Sep 2013 at 7:36