[Mesa-dev] [PATCH 1/4] r600g: avoid redundant DB register updates

Emil Velikov emil.l.velikov at gmail.com
Thu Apr 27 10:26:06 UTC 2017


Hi Constantine,

I'm not familiar with r600, so mostly a drive-by idea/nit.

On 25 April 2017 at 12:59, Constantine Kharlamov <Hi-Angel at yandex.ru> wrote:

> @@ -1746,45 +1747,47 @@ static void evergreen_emit_framebuffer_state(struct r600_context *rctx, struct r
>                 radeon_set_context_reg(cs, R_028E50_CB_COLOR8_INFO + (i - 8) * 0x1C, 0);
>
>         /* ZS buffer. */
> -       if (state->zsbuf) {

> +       if (rctx->framebuffer.dirty_zsbuf) {
> +               if (state->zsbuf) {
You can fold both if statements in a single one, leaving the
indentation level as-is.
As a bonus the resulting patch will be a lot smaller ;-)

Same can be done across the patch.

-Emil


More information about the mesa-dev mailing list