On 02/11/2015 09:13 AM, Tapani Pälli wrote:


On 02/10/2015 01:58 PM, Ilia Mirkin wrote:

Tapani's "glsl: validate output types for shader stages" patch is
necessary for the piglit that its description references to pass. If
you have a better suggestion of where to put that code, let me know.

I've taken more look in to this. If the output does not have a
interpolation qualifier then we incorrectly allow wrong types. My patch
validates the output type independent of the interpolation qualifier so
that's why it works. I can add more tests if wanted.

Sorry, this was not correct conclusion, the involved tests made me think so. The actual reason why patch works is that we validate the output variable types only if they are "valid varying variables" (see is_varying_var function), and output from fragment shader is not "valid varying". So we allow any type of output from fragment shader declared with 'out', this patch fixes that. It has some extra checks as it validates also outputs from other stages but to me it seems legit to do in that place.

// Tapani
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to