[Mesa-dev] [PATCH] glsl: check for forced_language_version in is_version()

Ian Romanick idr at freedesktop.org
Wed Apr 8 15:53:14 PDT 2015


Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 04/07/2015 09:33 AM, Brian Paul wrote:
> Ping.
> 
> On 04/01/2015 02:38 PM, Brian Paul wrote:
>> This is a follow-on fix from the earlier "glsl: allow ForceGLSLVersion
>> to override #version directives" change.  Since we're not changing
>> the language_version field, we have to check forced_language_version
>> here.
>> ---
>>   src/glsl/glsl_parser_extras.h | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/glsl/glsl_parser_extras.h
>> b/src/glsl/glsl_parser_extras.h
>> index 1f5478b..dae7864 100644
>> --- a/src/glsl/glsl_parser_extras.h
>> +++ b/src/glsl/glsl_parser_extras.h
>> @@ -105,8 +105,10 @@ struct _mesa_glsl_parse_state {
>>      {
>>         unsigned required_version = this->es_shader ?
>>            required_glsl_es_version : required_glsl_version;
>> +      unsigned this_version = this->forced_language_version
>> +         ? this->forced_language_version : this->language_version;
>>         return required_version != 0
>> -         && this->language_version >= required_version;
>> +         && this_version >= required_version;
>>      }
>>
>>      bool check_version(unsigned required_glsl_version,
>>
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 



More information about the mesa-dev mailing list