diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2023-04-24 16:27:11 -0400 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-05-03 23:45:36 +0000 |
commit | b86f0280d780a199e2336aa7fd2c1a6836418b1f (patch) | |
tree | 51aba7b58c935c5135d224064b771a98c9ee76cf /src/gallium/drivers | |
parent | c686c98a795f6a42bb7844cca022ab22c09b2464 (diff) |
i915: use util_copy_framebuffer_state to set fb state
Fixes: f5bde99cbdd ("gallium: plumb resolve attachments through from frontends -> pipe_framebuffer_state")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22673>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/i915/i915_state.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index cb5db6208af..f4640c0d501 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -815,12 +815,8 @@ i915_set_framebuffer_state(struct pipe_context *pipe, { struct i915_context *i915 = i915_context(pipe); - i915->framebuffer.width = fb->width; - i915->framebuffer.height = fb->height; - i915->framebuffer.nr_cbufs = fb->nr_cbufs; + util_copy_framebuffer_state(&i915->framebuffer, fb); if (fb->nr_cbufs) { - pipe_surface_reference(&i915->framebuffer.cbufs[0], fb->cbufs[0]); - struct i915_surface *surf = i915_surface(i915->framebuffer.cbufs[0]); if (i915->current.fixup_swizzle != surf->oc_swizzle) { i915->current.fixup_swizzle = surf->oc_swizzle; @@ -828,10 +824,7 @@ i915_set_framebuffer_state(struct pipe_context *pipe, sizeof(surf->color_swizzle)); i915->dirty |= I915_NEW_COLOR_SWIZZLE; } - } else { - pipe_surface_reference(&i915->framebuffer.cbufs[0], NULL); - } - pipe_surface_reference(&i915->framebuffer.zsbuf, fb->zsbuf); + } if (fb->zsbuf) draw_set_zs_format(i915->draw, fb->zsbuf->format); |