[Mesa-dev] [PATCH] r600g: track dirty registers better.

Dave Airlie airlied at gmail.com
Mon Apr 18 01:20:47 PDT 2011


On Mon, Apr 18, 2011 at 11:00 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This is a first step to decreasing the CPU usage, by decreasing how much
> stuff we pass to the GPU and hence to the kernel CS checker.
>
> This adds a check to see if the values we need to write are actually dirty,
> and avoids writing if they are. However certain register need to always
> be written so we add a new flag to say which ones should be always written
> if used. (Note this could probably be done cleaner with a larger refactoring,
>  since I think the CONST_BUFFER_SIZE_PS/VS and CONST_CACHE_PS/VS might
> be better off as a special state).
>
> It also moves the need_bo to be a flags on the register now.
>
> With this, a frame of gears goes from emitting 3k dwords to emitting 2k dwords,
> and I'm sure it could get a lot smaller.
>
> TODO:
> Currently we flush if we have a BO, this could probably be improved.
> Drop the special flush flag and move the buffer size ps/vs to a special state.
>

I've pushed a v2 of this to the r600g-dirty branch in my repo with
another couple of patches on top

the v2 just fixes the evergreen paths.

The other patches cause regressions, but decrease further the amount
of dwords per frame which should decrease time in the kernel parser,
just have to figure out the regressions.

Dave.


More information about the mesa-dev mailing list