[Mesa-dev] [PATCH 4/6] swr: use util_copy_framebuffer_state helper
Rowley, Timothy O
timothy.o.rowley at intel.com
Tue Nov 29 20:53:35 UTC 2016
Reviewed-by: Tim Rowley <timothy.o.rowley at intel.com<mailto:timothy.o.rowley at intel.com>>
On Nov 22, 2016, at 7:37 PM, Ilia Mirkin <imirkin at alum.mit.edu<mailto:imirkin at alum.mit.edu>> wrote:
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu<mailto:imirkin at alum.mit.edu>>
---
src/gallium/drivers/swr/swr_state.cpp | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index 4119379..8541aca 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;
}
--
2.7.3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161129/ecf6d705/attachment-0001.html>
More information about the mesa-dev
mailing list