[Mesa-dev] [PATCH 01/11] i965/vs: Add support for splitting virtual GRFs.
Eric Anholt
eric at anholt.net
Mon Oct 8 09:32:44 PDT 2012
Kenneth Graunke <kenneth at whitecape.org> writes:
> On 10/04/2012 04:07 PM, Eric Anholt wrote:
>> This should improve our ability to register allocate without spilling.
>> Unfortuantely, due to the live variable analysis being ignorant of loops, we
>> still have register allocation failures on some programs.
>> ---
>> src/mesa/drivers/dri/i965/brw_vec4.cpp | 54 +++++++++++++++++++++++++++
>> src/mesa/drivers/dri/i965/brw_vec4.h | 1 +
>> src/mesa/drivers/dri/i965/brw_vec4_emit.cpp | 1 +
>> 3 files changed, 56 insertions(+)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
>> index 2941729..fbd49ca 100644
>> --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
>> @@ -865,4 +865,58 @@ vec4_visitor::opt_compute_to_mrf()
>> return progress;
>> }
>>
>> +/**
>> + * Splits virtual GRFs requesting more than one contiguous physical register.
>> + *
>> + * Unlike in the FS visitor, we have no SEND messages that return more than 1
>> + * register. We also don't do any array access in register space, which would
>> + * have required contiguous physical registers.
>> + */
>
> It would be nice to mention what the VS /does/ have that occupies VGRFs
> of size > 1. Structures and matrices?
>
> Otherwise, this looks good.
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
New function comment:
/**
* Splits virtual GRFs requesting more than one contiguous physical register.
*
* We initially create large virtual GRFs for temporary structures, arrays,
* and matrices, so that the dereference visitor functions can add reg_offsets
* to work their way down to the actual member being accessed.
*
* Unlike in the FS visitor, though, we have no SEND messages that return more
* than 1 register. We also don't do any array access in register space,
* which would have required contiguous physical registers. Thus, all those
* large virtual GRFs can be split up into independent single-register virtual
* GRFs, making allocation and optimization easier.
*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121008/f21cb244/attachment.pgp>
More information about the mesa-dev
mailing list