[Mesa-dev] [PATCH 17/20] i965: Move _mesa_ir_link_shader call before device-specific linking
Ian Romanick
idr at freedesktop.org
Mon Oct 31 11:59:07 PDT 2011
On 10/28/2011 02:59 PM, Eric Anholt wrote:
> On Fri, 28 Oct 2011 10:42:44 -0700, "Ian Romanick"<idr at freedesktop.org> wrote:
>> From: Ian Romanick<ian.d.romanick at intel.com>
>>
>> _mesa_ir_link_shader needs to be called before cloning the IR tree so
>> that the var->location field for uniforms is set.
>>
>> WARNING: This change breaks several integer division related piglit
>> tests. The tests break because _mesa_ir_link_shader lowers integer
>> division to an RCP followed by a MUL. The fix is to factor out more
>> of the code from ir_to_mesa so that _mesa_ir_link_shader does not need
>> to be called at all by the i965 driver. This will be the subject of
>> several follow-on patches.
>
> How close are we to avoiding Mesa IR at this point? I'd rather see us
> hack in something to suppress that lowering or something if it's going
> to be very long.
A week or two, tops. Most of the bits that need to be split out are
already split out (and are shared between ir_to_mesa and
st_glsl_to_tgsi). I thought about adding a boolean flag so that
ir_to_mesa would skip all lowering, but I think that would lead to a lot
of follow-on failures in ir_to_mesa. That code rightfully makes a lot
of assumptions about how the IR will look before it does code generation.
More information about the mesa-dev
mailing list