summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-07-15 15:02:59 +0200
committerErik Faye-Lund <[email protected]>2019-10-28 08:51:46 +0000
commit5f14168edf577fcaaf389a225a5648a2e725bcf1 (patch)
tree5461223f0de2cd5c3ab1fdea8d8b6fd3db52eac8 /src/gallium
parent967e5705119ffb8a3e5362005531d8fee54c177f (diff)
zink/spirv: always enable Sampled1D for fragment shaders
Acked-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c4
1 files changed, 4 insertions, 0 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 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);