From 7bf76563e25222fa285cf9a19207318759588aac Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 15 Sep 2016 02:08:12 +0100 Subject: glsl: add subpass image type (v2) SPIR-V/Vulkan have a special image type for input attachments called the subpass type. It has different characteristics than other images types. The main one being it can only be an input image to fragment shaders and loads from it are relative to the frag coord. This adds support for it to the GLSL types. Unfortunately we've run out of space in the sampler dim in types, so we need to use another bit. v2: Fixup subpass input name (Jason) Reviewed-by: Jason Ekstrand Signed-off-by: Dave Airlie --- src/mesa/program/prog_to_nir.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/program') diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c index 1efd1a1a381..8a4437a2cee 100644 --- a/src/mesa/program/prog_to_nir.c +++ b/src/mesa/program/prog_to_nir.c @@ -596,6 +596,8 @@ ptn_tex(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src, case GLSL_SAMPLER_DIM_CUBE: instr->coord_components = 3; break; + case GLSL_SAMPLER_DIM_SUBPASS: + unreachable("can't reach"); } unsigned src_number = 0; -- cgit v1.2.3