mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +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> (cherry picked from commitb86f0280d7)
This commit is contained in:
parent
fca009ad9a
commit
5b037aaac4
2 changed files with 3 additions and 10 deletions
|
|
@ -688,7 +688,7 @@
|
|||
"description": "i915: use util_copy_framebuffer_state to set fb state",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "f5bde99cbdd208916795dc463663ddd97428ecc1"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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