[Mesa-dev] [PATCH] i965: Respect the no_8 flag on Gen6, not just Gen7+.

Matt Turner mattst88 at gmail.com
Fri Jan 9 22:45:57 PST 2015


On Fri, Jan 9, 2015 at 10:33 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On Friday, January 09, 2015 09:31:35 PM Matt Turner wrote:
>> On Fri, Jan 9, 2015 at 8:46 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
>> > When doing repclears, we only want to use the SIMD16 program, not the
>> > SIMD8 one.  Kristian added this to the Gen7+ code, but apparently we
>> > missed it in the Gen6 code.  This patch copies that code over.
>> >
>> > Approximately doubles the performance in a clear microbenchmark from
>> > mesa-demos (clearspd -width 500 -height 500 +color) on Sandybridge.
>>
>> What was actually happening? We were attempting to use a nonexistent
>> SIMD8 program as well? Or the SIMD16 repclear program just wasn't
>> getting used at all?
>
> When compiling, we only compile a SIMD16 program - no SIMD8 at all.
>
> Since there's no SIMD8 program, prog_data->prog_offset_16 == 0 (the SIMD16
> program is at the beginning).
>
> So then...in gen6_wm_state.c:145, we set GEN6_WM_8_DISPATCH_ENABLE...with
> the right dispatch_grf_start_reg...but with the SIMD16 repdata shader.
>
> So...we ran the SIMD16 repclear shader...with a send(16)...in SIMD8 dispatch
> mode.  I thought that was totally invalid, but it seems to be kind of working.
> Probably just taking twice as many pixel shader dispatches to do the job...
> which would correspond to the half speed problem.

Heh, awesome. That seems plausible.

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list