aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-10-29 23:16:30 +0100
committerErik Faye-Lund <[email protected]>2019-11-06 11:37:36 +0000
commitf3a72fd61c22d43e51d02b919af72aaa0587eb9b (patch)
tree3522bfa4acb31db53efd32ddf76cdc6a0a0c35fa
parent21be5c8edd3ad156f6cbfbceb96e7939716d9f2c (diff)
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 <[email protected]> Fixes: 8d46e35d16e ("zink: introduce opengl over vulkan")
-rw-r--r--src/gallium/drivers/zink/zink_context.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 61760d06cd1..028b95cd0d1 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -495,9 +495,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;