mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 17:40:11 +01:00
swr: use util_copy_framebuffer_state helper
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
This commit is contained in:
parent
86f7932b1e
commit
53ca06be8f
1 changed files with 1 additions and 12 deletions
|
|
@ -617,18 +617,7 @@ swr_set_framebuffer_state(struct pipe_context *pipe,
|
||||||
assert(fb->height <= KNOB_GUARDBAND_HEIGHT);
|
assert(fb->height <= KNOB_GUARDBAND_HEIGHT);
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
unsigned i;
|
util_copy_framebuffer_state(&ctx->framebuffer, fb);
|
||||||
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);
|
|
||||||
|
|
||||||
ctx->dirty |= SWR_NEW_FRAMEBUFFER;
|
ctx->dirty |= SWR_NEW_FRAMEBUFFER;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue