zink/spirv: always enable Sampled1D for fragment shaders
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 15 Jul 2019 13:02:59 +0000 (15:02 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 28 Oct 2019 08:51:46 +0000 (08:51 +0000)
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c

index 26bcd90a0559cdbf83e52448fd44a4294b5db7f4..c3d84ec8643384f60d6e78e9851226929daa1ca1 100644 (file)
@@ -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);