[Mesa-dev] Mesa (master): draw: fix flat shading and screen-space linear interpolation in clipper

Stéphane Marchesin stephane.marchesin at gmail.com
Mon Jun 25 11:41:30 PDT 2012


The specific commit that seems to break it is:
46931ecf480e1d231bb6c2236d91b5390f2465ac llvmpipe: Simplify and fix
system variables fetch.

On Mon, Jun 25, 2012 at 10:46 AM, Stéphane Marchesin
<stephane.marchesin at gmail.com> wrote:
> Hi Olivier,
>
> On top of the GL_SELECT regressions reported by Brian, this patch
> series is causing regressions on i915g for:
>
> draw-instanced
> draw-instanced-divisor
> draw-elements-instanced-base-vertex
> draw-elements-instanced-base-vertex-user_varrays
> draw-non-instanced
> instance-array-dereference
>
> Stéphane
>
>
> On Thu, Jun 21, 2012 at 10:39 AM, Olivier Galibert <galibert at pobox.com> wrote:
>> On Thu, Jun 21, 2012 at 10:28:22AM -0700, Jose Fonseca wrote:
>>> This patch series is causing regressions in select/feedback mode. Can you take a look?
>>
>> Sure.  I wouldn't have expected that case to ever happen, but it makes
>> sense now that I think of it.
>>
>> commit edc7b26b03c0393582ff5ec8c963207c7553850a
>> Author: Olivier Galibert <galibert at pobox.com>
>> Date:   Thu Jun 21 19:37:11 2012 +0200
>>
>>    clip_init_state: Handle the case when there isn't a fragment shader.
>>
>>    Signed-off-by: Olivier Galibert <galibert at pobox.com>
>>
>> diff --git a/src/gallium/auxiliary/draw/draw_pipe_clip.c b/src/gallium/auxiliary/draw/draw_pipe_clip.c
>> index 2d36eb3..c02d0ef 100644
>> --- a/src/gallium/auxiliary/draw/draw_pipe_clip.c
>> +++ b/src/gallium/auxiliary/draw/draw_pipe_clip.c
>> @@ -586,6 +586,9 @@ clip_init_state( struct draw_stage *stage )
>>     * two outputs for one input, so we tuck the information in a
>>     * specific array.  Second if they don't have qualifiers, the
>>     * default value has to be picked from the global shade mode.
>> +    *
>> +    * Of course, if we don't have a fragment shader in the first
>> +    * place, defaults should be used.
>>     */
>>
>>    /* First pick up the interpolation mode for
>> @@ -595,10 +598,12 @@ clip_init_state( struct draw_stage *stage )
>>    indexed_interp[0] = indexed_interp[1] = stage->draw->rasterizer->flatshade ?
>>       TGSI_INTERPOLATE_CONSTANT : TGSI_INTERPOLATE_PERSPECTIVE;
>>
>> -   for (i = 0; i < fs->info.num_inputs; i++) {
>> -      if (fs->info.input_semantic_name[i] == TGSI_SEMANTIC_COLOR) {
>> -         if (fs->info.input_interpolate[i] != TGSI_INTERPOLATE_COLOR)
>> -            indexed_interp[fs->info.input_semantic_index[i]] = fs->info.input_interpolate[i];
>> +   if (fs) {
>> +      for (i = 0; i < fs->info.num_inputs; i++) {
>> +         if (fs->info.input_semantic_name[i] == TGSI_SEMANTIC_COLOR) {
>> +            if (fs->info.input_interpolate[i] != TGSI_INTERPOLATE_COLOR)
>> +               indexed_interp[fs->info.input_semantic_index[i]] = fs->info.input_interpolate[i];
>> +         }
>>       }
>>    }
>>
>> @@ -627,12 +632,14 @@ clip_init_state( struct draw_stage *stage )
>>           */
>>          uint j;
>>          interp = TGSI_INTERPOLATE_PERSPECTIVE;
>> -         for (j = 0; j < fs->info.num_inputs; j++) {
>> -            if (vs->info.output_semantic_name[i] == fs->info.input_semantic_name[j] &&
>> -                vs->info.output_semantic_index[i] == fs->info.input_semantic_index[j]) {
>> -               interp = fs->info.input_interpolate[j];
>> -               break;
>> -            }
>> +         if (fs) {
>> +            for (j = 0; j < fs->info.num_inputs; j++) {
>> +               if (vs->info.output_semantic_name[i] == fs->info.input_semantic_name[j] &&
>> +                   vs->info.output_semantic_index[i] == fs->info.input_semantic_index[j]) {
>> +                  interp = fs->info.input_interpolate[j];
>> +                  break;
>> +               }
>> +            }
>>          }
>>       }
>>
>> _______________________________________________
>> 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