[Mesa-dev] [PATCH] i965: Use NIR by default for vertex shaders on GEN8+

Ian Romanick idr at freedesktop.org
Thu May 7 18:31:48 PDT 2015


On 05/07/2015 06:17 PM, Matt Turner wrote:
> On Thu, May 7, 2015 at 4:50 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
>> GLSL IR vs. NIR shader-db results for SIMD8 vertex shaders on Broadwell:
>>
>>    total instructions in shared programs: 2724483 -> 2711790 (-0.47%)
>>    instructions in affected programs:     1860859 -> 1848166 (-0.68%)
>>    helped:                                4387
>>    HURT:                                  4758
>>    GAINED:                                1499
>>
>> The gained programs are ARB vertext programs that were previously going
>> through the vec4 backend.  Now that we have prog_to_nir, ARB vertex
>> programs can go through the scalar backend so they show up as "gained" in
>> the shader-db results.
> 
> Again, I'm kind of confused and disappointed that we're just okay with
> hurting 4700 programs without more analysis. I guess I'll go do
> that...

Yeah... I think I just (foolishly) assumed it was mostly +/- small
amounts given the % in affected programs.

> I'm concerned -- lots of shaders like left-4-dead-2/low/3699 go from
> 297 -> 161 instructions. More concerning, the number of send
> instructions drop from 36 to 12, and a loop that was 111 instructions
> long suddenly becomes
> 
>    START B1 <-B0 <-B2
> cmp.ge.f0(8)    null            g42<8,8,1>D     g7<0,1,0>D
> (+f0) break(8)  JIP: 24         UIP: 24
>    END B1 ->B3 ->B2
>    START B2 <-B1
> add(8)          g42<1>D         g42<8,8,1>D     1D
> while(8)        JIP: -32
>    END B2 ->B1
> 
> That deserves a lot more investigation. I'll take a gamble and say
> something is broken.

Yikes.  I guess I'm surprised that piglit+gles3conform+deqp didn't
already find

> _______________________________________________
> 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