From 5f14168edf577fcaaf389a225a5648a2e725bcf1 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 15 Jul 2019 15:02:59 +0200 Subject: [PATCH] zink/spirv: always enable Sampled1D for fragment shaders Acked-by: Jordan Justen --- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 4 ++++ 1 file changed, 4 insertions(+) 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 26bcd90a055..c3d84ec8643 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 @@ -1471,6 +1471,10 @@ nir_to_spirv(struct nir_shader *s) unreachable("invalid stage"); } + // TODO: only enable when needed + if (s->info.stage == MESA_SHADER_FRAGMENT) + spirv_builder_emit_cap(&ctx.builder, SpvCapabilitySampled1D); + ctx.stage = s->info.stage; ctx.GLSL_std_450 = spirv_builder_import(&ctx.builder, "GLSL.std.450"); spirv_builder_emit_source(&ctx.builder, SpvSourceLanguageGLSL, 450); -- 2.30.2