[Mesa-dev] [PATCH 08/11] i965/vec4: Track the number of channels used in a virtual grf.
eric at anholt.net
Mon Oct 8 09:25:44 PDT 2012
Kenneth Graunke <kenneth at whitecape.org> writes:
> On 10/04/2012 04:07 PM, Eric Anholt wrote:
>> For tracking live variables, we want to know when a register is completely
>> rewritten, so we need to be able to compare a writemask to the size of the
>> register. There's also potential use for this in register coalescing.
> Two comments:
> 1. Please move the last hunk from patch 11 into this patch:
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> index 1dfdcce..9482d47 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> @@ -2695,6 +2695,7 @@ vec4_visitor::vec4_visitor(struct brw_vs_compile *c,
> this->virtual_grf_def = NULL;
> this->virtual_grf_use = NULL;
> this->virtual_grf_sizes = NULL;
> + this->virtual_grf_chans = NULL;
> this->virtual_grf_count = 0;
> this->virtual_grf_reg_map = NULL;
> this->virtual_grf_reg_count = 0;
> 2. I don't see any patches in your series which use this.
> The tracking itself looks fine, but without any consumers of this data,
> it's hard to tell whether this is the most sensible way to do it.
> So you get a
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
> but I might hold off on pushing it until you have a patch that actually
> uses it.
That's embarassing. I'll pull the patch out and save it on a branch.
It *was* used at one point in the series, before I did live variables on
a per-channel basis (I just marked things that initialized all of
virtual_grf_chans as defs). Once I made live variables track
per channel, this is no longer needed.
Once we have support for reswizzling (what I'm calling the operation for
"MUL tmp.x a.x b.y; MOV reult.y tmp.x;" -> "MUL result.y a.xx b.yy;"), I think
we'll want to use this to also do register allocation of small vgrfs
into the same register.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the mesa-dev