[Mesa-dev] [PATCH 1/6] radeonsi: emit_db_render_state packets optimization

Marek Olšák maraeo at gmail.com
Fri Jun 8 02:12:42 UTC 2018


On Thu, Jun 7, 2018 at 8:11 PM, Dave Airlie <airlied at gmail.com> wrote:

> On 8 June 2018 at 07:53, Jiang, Sonny <Sonny.Jiang at amd.com> wrote:
> > By applied patch 1, gfx IB size changes obviously.
> >
> >
> > openarena GFX-IB-size changes from 7.64k to 7.44k.
> > glxgears GFX-IB-size changes from 8.48k to 8.416k.
> >
> >
> > The adding CPU workloads are quite small in this case and it's  hard to
> > measure it. So the assumption is that writing a SET_CONTEXT_REG packet is
> > more expensive. And we emit too many redundant packets. Some registers
> > rarely get different values.
>
> We spend a lot of time removing CPU overheads in draw call paths,  even
> threaded
> it can still be something. This sort of idea can introduce a lot of
> branches and cache
> misses, reading a value back from the tracked_regs with a branch as
> opposed to
> just writing directly to the DMA packet.
>
> I think without a specified win for this code you aren't make things
> better. it's
> up to Marek and Nicolai, but I'm very wary of wasting time/energy in
> this direction
> without some numbers to show anything, good or bad.
>

It was my idea to do this. Only emit functions that can benefit are
optimized here. There are many others that won't be optimized like this for
precisely the reasons you mentioned.

If there is one unnecessary SET_CONTEXT_REG packet between 2 draw calls and
that packet is removed, we gain real GPU performance, not just an IB space
saving.

Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180607/54d270ff/attachment.html>


More information about the mesa-dev mailing list