diff options
author | Rob Clark <[email protected]> | 2018-05-14 09:09:17 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-05-15 08:48:13 -0400 |
commit | dace6072459c94ff7dbc3a248ceef3d95bd26631 (patch) | |
tree | 40ee4f17251b881a49db23eb0313f67fe2f8c8b7 | |
parent | dae4c98dd7669acbc5488d50751cde6cefc6883e (diff) |
vc5: use util_copy_framebuffer_state
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r-- | src/gallium/drivers/vc5/vc5_state.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gallium/drivers/vc5/vc5_state.c b/src/gallium/drivers/vc5/vc5_state.c index 42ae64157c4..0ed0acd16ac 100644 --- a/src/gallium/drivers/vc5/vc5_state.c +++ b/src/gallium/drivers/vc5/vc5_state.c @@ -24,6 +24,7 @@ #include "pipe/p_state.h" #include "util/u_format.h" +#include "util/u_framebuffer.h" #include "util/u_inlines.h" #include "util/u_math.h" #include "util/u_memory.h" @@ -441,21 +442,10 @@ vc5_set_framebuffer_state(struct pipe_context *pctx, { struct vc5_context *vc5 = vc5_context(pctx); struct pipe_framebuffer_state *cso = &vc5->framebuffer; - unsigned i; vc5->job = NULL; - for (i = 0; i < framebuffer->nr_cbufs; i++) - pipe_surface_reference(&cso->cbufs[i], framebuffer->cbufs[i]); - for (; i < vc5->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); vc5->swap_color_rb = 0; vc5->blend_dst_alpha_one = 0; |