[Mesa-dev] [PATCH] glsl: Fix ir_print_visitor's handling of interpolation qualifiers.

Paul Berry stereotype441 at gmail.com
Tue Apr 9 10:07:06 PDT 2013


On 8 April 2013 10:23, Ian Romanick <idr at freedesktop.org> wrote:

> On 04/06/2013 07:20 PM, Paul Berry wrote:
>
>> This patch updates the interp[] array to match the enum
>> glsl_interp_qualifier.
>>
>
> Can we use STATIC_ASSERT to make sure these arrays are at least the
> correct size?


Sure, that seems reasonable.  I'll do a similar thing for the mode[] array.


>
>
>  ---
>>   src/glsl/ir_print_visitor.cpp | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/glsl/ir_print_visitor.**cpp b/src/glsl/ir_print_visitor.
>> **cpp
>> index 597d281..8b445dc 100644
>> --- a/src/glsl/ir_print_visitor.**cpp
>> +++ b/src/glsl/ir_print_visitor.**cpp
>> @@ -149,7 +149,7 @@ void ir_print_visitor::visit(ir_**variable *ir)
>>      const char *const mode[] = { "", "uniform ", "shader_in ",
>> "shader_out ",
>>                                   "in ", "out ", "inout ",
>>                                 "const_in ", "sys ", "temporary " };
>> -   const char *const interp[] = { "", "flat", "noperspective" };
>> +   const char *const interp[] = { "", "smooth", "flat", "noperspective"
>> };
>>
>>      printf("(%s%s%s%s) ",
>>           cent, inv, mode[ir->mode], interp[ir->interpolation]);
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130409/a644705e/attachment.html>


More information about the mesa-dev mailing list