summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-11-20 14:04:51 -0500
committerIlia Mirkin <[email protected]>2016-11-29 20:54:50 -0500
commit53ca06be8f2f18cbc00d77324006f725c7faa31c (patch)
treef430fb526c27426711716d13746c77f7ac9c009d /src/gallium/drivers
parent86f7932b1e65598fd989f3ab6acbd15fb8babc7f (diff)
swr: use util_copy_framebuffer_state helper
Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/swr/swr_state.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index a67cb6050d9..f1cf4ae2e52 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -617,18 +617,7 @@ swr_set_framebuffer_state(struct pipe_context *pipe,
assert(fb->height <= KNOB_GUARDBAND_HEIGHT);
if (changed) {
- unsigned i;
- for (i = 0; i < fb->nr_cbufs; ++i)
- pipe_surface_reference(&ctx->framebuffer.cbufs[i], fb->cbufs[i]);
- for (; i < ctx->framebuffer.nr_cbufs; ++i)
- pipe_surface_reference(&ctx->framebuffer.cbufs[i], NULL);
-
- ctx->framebuffer.nr_cbufs = fb->nr_cbufs;
-
- ctx->framebuffer.width = fb->width;
- ctx->framebuffer.height = fb->height;
-
- pipe_surface_reference(&ctx->framebuffer.zsbuf, fb->zsbuf);
+ util_copy_framebuffer_state(&ctx->framebuffer, fb);
ctx->dirty |= SWR_NEW_FRAMEBUFFER;
}