There is no tool to test the shader. Even if that were the case, it would not be useful for you because it is a good shader that is "valid" if it does not work on the right hardware? You may be right, whatever you want, but if your equipment rejects it, even if you are technically right, your shader will still not work.
If a shader of a certain version is compiled for one target (call it A), and not to another (call it B), this may be caused by one of the following problems:
- Target A does not perform GLSL properly. This allowed you to compile what the specification does not allow. A more compatible target B (or at least in some ways incompatible) rejects your shader because your shader does not meet the specification.
- Target B is out of specification. You feed it a legal shader and reject it.
- Target B does not support the version of GLSL used by your shader (this is unlikely), unless:
- Target B uses the OpenGL kernel specification version 3.2 or higher. GLSL 1.20 shaders cannot be launched based on 3.2 OpenGL implementations.
# 1 is likely to happen if you develop exclusively on NVIDIA hardware. NVIDIA is a little fast and free using the OpenGL specification. They will accept several privileges here and there, smoothing out some of the unpleasant things that are mentioned in the specification. This provides a smoother developer experience, but also helps support suppliers using NVIDIA hardware if shaders do not work on competitors;)
# 3 practically does not exist, with the exception noted. You are associated with the Photoshop shader, so I understand that you do not control the creation and management of the OpenGL context. However, I highly doubt that Photoshop will use the main context; they have too many shaders that need backward compatibility.
The best way to handle this is to test on both AMD hardware and NVIDIA (and Intel if you need to run there). You may not need to test all possible combinations of systems, but choose a Radeon HD card and a GeForce 200 or better. They do not even have to be high-end.
source share