[Mesa-dev] [PATCH 3/3] r600g: only emit blocks when they are changed

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Mon Apr 18 08:33:29 PDT 2011


On 04/18/11 12:14, Dave Airlie wrote:
> On Thu, Apr 14, 2011 at 4:36 AM, Bas Nieuwenhuizen
> <bas at basnieuwenhuizen.nl> wrote:
>> previously, we always emitted blocks that were set before a draw, after this
>>  patch the block only gets emitted when it is really changed.
>>
>> Also added a force parameter to r600_context_pipe_state_set, because the
>> shader constant buffers need 2 registers in different blocks updated, even
>> if only one is dirty, so those blocks are always marked dirty when they
>>  are set.
> Hi Bas,
>
> I just realised I NIHed nearly exactly this patch modulo cleaning up
> the code to use the loops etc,
> in the patch I posted.
>
> I'd be interested if you could review it and see if it works the same,
>
> Thanks,
> Dave.
My patch already had the bo checking. The register checking in yours
seems to be correct.

The second patch in your branch seems to have the error that it only
sets nreg_dirty
when the block wasn't dirty yet. You probably always want to set it when
the register is dirty,
like this: http://basnieuwenhuizen.nl/r600_dirty1.txt

The third patch seems correct. I do not think adding buffer dirty checks
for the the other set_* functions
will be an issue, at least for a r700.

Regards,
Bas Nieuwenhuizen



More information about the mesa-dev mailing list