[Mesa-dev] [PATCH 4/5] glsl: Implement MESA_shader_integer_mix extension.
Matt Turner
mattst88 at gmail.com
Sat Sep 7 09:20:30 PDT 2013
On Fri, Sep 6, 2013 at 10:53 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
>> + 2) Should we mix() to select between boolean components?
>
>
> I feel like there should be a word between "Should we" and "mix()". Perhaps
> "Should we allow mix() to select between boolean components"?
Yes, definitely missing a word.
>> --- a/src/glsl/builtin_functions.cpp
>> +++ b/src/glsl/builtin_functions.cpp
>> @@ -747,6 +747,21 @@ builtin_builder::create_builtins()
>> _mix_sel(glsl_type::vec2_type, glsl_type::bvec2_type),
>> _mix_sel(glsl_type::vec3_type, glsl_type::bvec3_type),
>> _mix_sel(glsl_type::vec4_type, glsl_type::bvec4_type),
>> +
>> + _mix_sel(glsl_type::int_type, glsl_type::bool_type),
>> + _mix_sel(glsl_type::ivec2_type, glsl_type::bvec2_type),
>> + _mix_sel(glsl_type::ivec3_type, glsl_type::bvec3_type),
>> + _mix_sel(glsl_type::ivec4_type, glsl_type::bvec4_type),
>> +
>> + _mix_sel(glsl_type::uint_type, glsl_type::bool_type),
>> + _mix_sel(glsl_type::uvec2_type, glsl_type::bvec2_type),
>> + _mix_sel(glsl_type::uvec3_type, glsl_type::bvec3_type),
>> + _mix_sel(glsl_type::uvec4_type, glsl_type::bvec4_type),
>> +
>> + _mix_sel(glsl_type::bool_type, glsl_type::bool_type),
>> + _mix_sel(glsl_type::bvec2_type, glsl_type::bvec2_type),
>> + _mix_sel(glsl_type::bvec3_type, glsl_type::bvec3_type),
>> + _mix_sel(glsl_type::bvec4_type, glsl_type::bvec4_type),
>> NULL);
>
>
> This will expose the built-ins even without the extension. You probably
> want to pass in the availability predicate.
Oh, strange. I definitely made this change after talking with you in
person yesterday. I'm not sure where it went, but I'll readd it.
> Otherwise, this looks good! For the series,
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Thanks!
Matt
More information about the mesa-dev
mailing list