Friday, January 26, 2018

opengl - Multiplatform GLSL shader validator?


Im working on a multiplatform (Pc,Mac,Linux) game that uses shaders quite extensively. Since we do not have any funding, it is pretty hard to test our game on all possible hardware configurations.


While our engine seems to run fine on different platforms, its usually the slight differences in GLSL compiling that gives us headaches. We have things set up such that we can test the shaders on Ati/Nvidia cards, but since the new Macbooks have Intel graphics, I'm really looking for a tool that can simply validate my GLSL shaders for different hardware without the need of yet another system.


Does anyone know such a tool?



Answer



The GLSL specification defines how the language works. If you write a shader that conforms to that specification, and it does not work on a particular OpenGL implementation, then that OpenGL implementation has a bug in it. Which means that you are effectively asking for a tool that can reproduce the bugs in Apple's Intel drivers.


That is pretty much impossible. To do that, someone would have to have a list of every bug for every driver revision in Apple's Intel graphics drivers. Even if someone tried to get a list of those bugs and wrote a parser that reproduced them, that wouldn't guarantee you anything, since there could always be new bugs introduced. Or the "validator" could have implemented those bugs incorrectly.


The best you can hope for would be a shader validator that could tell if your GLSL shader conformed to the specification. But that's about it.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...