mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
i915: use util_copy_framebuffer_state to set fb state
Fixes: f5bde99cbd ("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>
This commit is contained in:
parent
c686c98a79
commit
b86f0280d7
1 changed files with 2 additions and 9 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue