[Mesa-dev] [PATCH 1/3] glsl: Disallow `pragma STDGL invariant(all)` in fragment shaders

Chris Forbes chrisf at ijw.co.nz
Sun Nov 30 20:47:48 PST 2014


Let's go with your version then. It's got a spec citation and everything :)

Consider your patch: Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>

On Mon, Dec 1, 2014 at 5:43 PM, Tapani <tapani.palli at intel.com> wrote:
> I sent this too when submitting the test :)
>
> http://patchwork.freedesktop.org/patch/36194/
>
>
> On 11/29/2014 10:54 PM, Chris Forbes wrote:
>>
>> Fixes the piglit test: spec/glsl-es-3.00/compiler/invariant_all.frag
>>
>> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
>> ---
>>   src/glsl/glsl_parser.yy | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
>> index dbab815..6592a84 100644
>> --- a/src/glsl/glsl_parser.yy
>> +++ b/src/glsl/glsl_parser.yy
>> @@ -337,6 +337,10 @@ pragma_statement:
>>                               "pragma `invariant(all)' not supported in %s
>> "
>>                               "(GLSL ES 1.00 or GLSL 1.20 required)",
>>                               state->get_version_string());
>> +      } else if (state->stage == MESA_SHADER_FRAGMENT) {
>> +         _mesa_glsl_error(& @1, state,
>> +                          "pragma `invariant(all)' may not be used in a "
>> +                          "fragment shader.");
>>         } else {
>>            state->all_invariant = true;
>>         }
>
>


More information about the mesa-dev mailing list