mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
zink: use actual format for render-pass
We should use the format derived from the image-view here, not from the image itselt. Otherwise, we'll end up with incompatible render-passes. Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Fixes:8d46e35d16("zink: introduce opengl over vulkan") (cherry picked from commitf3a72fd61c)
This commit is contained in:
parent
5ca2bb392f
commit
2ea5038045
1 changed files with 4 additions and 3 deletions
|
|
@ -488,9 +488,10 @@ get_render_pass(struct zink_context *ctx)
|
|||
struct zink_render_pass_state state;
|
||||
|
||||
for (int i = 0; i < fb->nr_cbufs; i++) {
|
||||
struct zink_resource *cbuf = zink_resource(fb->cbufs[i]->texture);
|
||||
state.rts[i].format = cbuf->format;
|
||||
state.rts[i].samples = cbuf->base.nr_samples > 0 ? cbuf->base.nr_samples : VK_SAMPLE_COUNT_1_BIT;
|
||||
struct pipe_resource *res = fb->cbufs[i]->texture;
|
||||
state.rts[i].format = zink_get_format(screen, fb->cbufs[i]->format);
|
||||
state.rts[i].samples = res->nr_samples > 0 ? res->nr_samples :
|
||||
VK_SAMPLE_COUNT_1_BIT;
|
||||
}
|
||||
state.num_cbufs = fb->nr_cbufs;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue