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

2018-06-07 Thread Marek Olšák
On Thu, Jun 7, 2018 at 8:11 PM, Dave Airlie wrote: > On 8 June 2018 at 07:53, Jiang, Sonny 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 CP

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

2018-06-07 Thread Dave Airlie
On 8 June 2018 at 07:53, Jiang, Sonny 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

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

2018-06-07 Thread Jiang, Sonny
T_REG packet is more expensive. And we emit too many redundant packets. Some registers rarely get different values. Thanks, Sonny From: Dave Airlie Sent: Thursday, June 7, 2018 5:20:12 PM To: Jiang, Sonny Cc: mesa-dev Subject: Re: [Mesa-dev] [PATCH 1/6] rad

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

2018-06-07 Thread Dave Airlie
On 8 June 2018 at 02:13, Sonny Jiang wrote: > Remembering latest states of registers to eliminate redunant SET_CONTEXT_REG > packets > Does this help anywhere btw? Numbers for an app or game. In the past I've always found this sort of optimisation pointless, the CP on the GPU side does a pretty

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

2018-06-07 Thread Sonny Jiang
Remembering latest states of registers to eliminate redunant SET_CONTEXT_REG packets Signed-off-by: Sonny Jiang --- src/gallium/drivers/radeonsi/si_build_pm4.h | 43 + src/gallium/drivers/radeonsi/si_gfx_cs.c| 3 ++ src/gallium/drivers/radeonsi/si_pipe.h | 2 + sr