summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2021-04-21 12:09:45 +0200
committerErik Faye-Lund <erik.faye-lund@collabora.com>2021-05-05 10:51:00 +0200
commit567699f0487e514ae647870160292ee3977835ff (patch)
tree1d1ac25c01280729943be8785af23a9fc218a540 /src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
parent922f71b819b06cd4acbf14dbb1d1b161bd6e3953 (diff)
zink: always enable fixed shader-caps
This is required for a bunch of stuff that can occur in any Vulkan shader stage, not just these few. So let's always emit this cap. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10371>
Diffstat (limited to 'src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c')
-rw-r--r--src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c15
1 files changed, 5 insertions, 10 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 807186ad946..6eff7518225 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
@@ -3576,15 +3576,11 @@ nir_to_spirv(struct nir_shader *s, const struct zink_so_info *so_info, bool spir
if (!ctx.glsl_types)
goto fail;
- switch (s->info.stage) {
- case MESA_SHADER_VERTEX:
- case MESA_SHADER_FRAGMENT:
- case MESA_SHADER_COMPUTE:
- spirv_builder_emit_cap(&ctx.builder, SpvCapabilityShader);
- spirv_builder_emit_cap(&ctx.builder, SpvCapabilityImageBuffer);
- spirv_builder_emit_cap(&ctx.builder, SpvCapabilitySampledBuffer);
- break;
+ spirv_builder_emit_cap(&ctx.builder, SpvCapabilityShader);
+ spirv_builder_emit_cap(&ctx.builder, SpvCapabilityImageBuffer);
+ spirv_builder_emit_cap(&ctx.builder, SpvCapabilitySampledBuffer);
+ switch (s->info.stage) {
case MESA_SHADER_TESS_CTRL:
case MESA_SHADER_TESS_EVAL:
spirv_builder_emit_cap(&ctx.builder, SpvCapabilityTessellation);
@@ -3601,8 +3597,7 @@ nir_to_spirv(struct nir_shader *s, const struct zink_so_info *so_info, bool spir
spirv_builder_emit_cap(&ctx.builder, SpvCapabilityGeometryPointSize);
break;
- default:
- unreachable("invalid stage");
+ default: ;
}
ctx.info = &s->info;