summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2021-04-21 12:55:12 +0200
committerErik Faye-Lund <erik.faye-lund@collabora.com>2021-05-05 10:51:02 +0200
commit5a1675a03030c68f2f4b27f1a687b56762e4190a (patch)
tree1d3152e1db4e38df9ea909765fff4d96a403f08a
parentdcb9e4ddb4bac761c9099ff722c488b32524c2e6 (diff)
zink: only emit ImageBuffer cap if needed
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10371>
-rw-r--r--src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
index bde07529237..2701791214f 100644
--- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
+++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
@@ -3565,7 +3565,8 @@ nir_to_spirv(struct nir_shader *s, const struct zink_so_info *so_info, bool spir
goto fail;
spirv_builder_emit_cap(&ctx.builder, SpvCapabilityShader);
- spirv_builder_emit_cap(&ctx.builder, SpvCapabilityImageBuffer);
+ if (s->info.image_buffers != 0)
+ spirv_builder_emit_cap(&ctx.builder, SpvCapabilityImageBuffer);
spirv_builder_emit_cap(&ctx.builder, SpvCapabilitySampledBuffer);
switch (s->info.stage) {