[Mesa-dev] [PATCH 1/2] vc4: use util_copy_framebuffer_state
Rob Clark
robdclark at gmail.com
Mon May 14 14:02:45 UTC 2018
On Mon, May 14, 2018 at 9:16 AM, Rob Clark <robdclark at gmail.com> wrote:
> Signed-off-by: Rob Clark <robdclark at gmail.com>
> ---
> Just happened to notice that vc4/vc5 was open-coding
> util_copy_framebuffer_state()
and ofc if I actually managed to test-compile what I *thought* I was
compiling, I would have noticed the missing #include and unused
variable warning, both of which fixed up locally
BR,
-R
>
> src/gallium/drivers/vc4/vc4_state.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c
> index f8c37818499..abce68916b0 100644
> --- a/src/gallium/drivers/vc4/vc4_state.c
> +++ b/src/gallium/drivers/vc4/vc4_state.c
> @@ -418,17 +418,7 @@ vc4_set_framebuffer_state(struct pipe_context *pctx,
>
> vc4->job = NULL;
>
> - for (i = 0; i < framebuffer->nr_cbufs; i++)
> - pipe_surface_reference(&cso->cbufs[i], framebuffer->cbufs[i]);
> - for (; i < vc4->framebuffer.nr_cbufs; i++)
> - pipe_surface_reference(&cso->cbufs[i], NULL);
> -
> - cso->nr_cbufs = framebuffer->nr_cbufs;
> -
> - pipe_surface_reference(&cso->zsbuf, framebuffer->zsbuf);
> -
> - cso->width = framebuffer->width;
> - cso->height = framebuffer->height;
> + util_copy_framebuffer_state(cso, framebuffer);
>
> /* Nonzero texture mipmap levels are laid out as if they were in
> * power-of-two-sized spaces. The renderbuffer config infers its
> --
> 2.17.0
>
More information about the mesa-dev
mailing list