[Mesa-dev] [PATCH] mesa: allow unlimited temporaries

Christoph Bumiller e0425955 at student.tuwien.ac.at
Tue Sep 7 03:33:51 PDT 2010


On 09/06/2010 06:58 PM, Luca Barbieri wrote:
>> And prog_optimize can't do anything if there are temporaries with indirect
>> addressing. We need either the temporary array file or to do register
>> allocation in GLSL IR.
> 
> Sure, but I think this can/should be done on top of this change, and
> thus isn't an argument against it.
> 
But you said that this particular shader doesn't use indirect TEMP
addressing, so I think this patch would be useful after all, if we don't
want to do register allocation 3 times (GLSL IR, prog_optimize, and
the driver (nv50 uses linear scan)).

> Instead of a temporary register file, just adding bounds to indirect
> addressing instructions would be slightly more expressive. Not sure
> which is better.
> 
I'd still like a separate declaration for each array in addition to
addressing bounds, which would certainly be helpful as well though.

> DirectX 10 has indirect temp declarations with "dcl_indexableTemp".
> 
> Anyway, pre-DirectX 10 cards such as nv30/nv40 often don't support
> indirect temps at all, so they will need to be lowered somewhere,
> ideally in a GLSL lowering pass, so that we can kill some of the
> conditional assignments if we know that the index cannot take that
> value.
> _______________________________________________
> 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