[Mesa-dev] [PATCH 15/23] glsl: Distribute binary operations over ir_triop_csel
Ian Romanick
idr at freedesktop.org
Fri Mar 20 16:35:57 PDT 2015
On 03/20/2015 03:09 PM, Matt Turner wrote:
> On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> From: Ian Romanick <ian.d.romanick at intel.com>
>>
>> If the both result operands of the ir_triop_csel are constants and the
>> other operand of the binary operation is constant, distributing the
>> unary operation allows constant folding to eliminate it.
>>
>> Shader-db results:
>>
>> GM45 (0x2A42):
>> total instructions in shared programs: 3545351 -> 3545378 (0.00%)
>> instructions in affected programs: 28774 -> 28801 (0.09%)
>> helped: 59
>> HURT: 65
>
> Odd.
Yeah... that and the Iron Lake result have been nagging at the back of
my mind. My suspicion is that a lot of the shaders from shader-db that
benefit from this patch use GLSL 1.30 or later. As a result, they are
not built on GM45 or Iron Lake... but I haven't dug into it.
More information about the mesa-dev
mailing list