summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/spirv_to_nir.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-09-15 02:08:28 +0100
committerDave Airlie <airlied@redhat.com>2016-09-16 15:16:31 +1000
commite1ea36ae719619e69dadaf7efa7c7a40f891be91 (patch)
tree48308e332d547d4b5587a16ce033007bb5f52a7b /src/compiler/spirv/spirv_to_nir.c
parent7bf76563e25222fa285cf9a19207318759588aac (diff)
downloadexternal_mesa3d-e1ea36ae719619e69dadaf7efa7c7a40f891be91.zip
external_mesa3d-e1ea36ae719619e69dadaf7efa7c7a40f891be91.tar.gz
external_mesa3d-e1ea36ae719619e69dadaf7efa7c7a40f891be91.tar.bz2
spirv: use subpass image type (v1.1)
This adds support for the input attachments subpass type to the SPIRV->NIR pass. v1.1: drop handling from vtn_handle_texture Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/compiler/spirv/spirv_to_nir.c')
-rw-r--r--src/compiler/spirv/spirv_to_nir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 7e7a026..49338b2 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -828,6 +828,7 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
case SpvDimCube: dim = GLSL_SAMPLER_DIM_CUBE; break;
case SpvDimRect: dim = GLSL_SAMPLER_DIM_RECT; break;
case SpvDimBuffer: dim = GLSL_SAMPLER_DIM_BUF; break;
+ case SpvDimSubpassData: dim = GLSL_SAMPLER_DIM_SUBPASS; break;
default:
unreachable("Invalid SPIR-V Sampler dimension");
}
@@ -854,7 +855,7 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
val->type->type = glsl_sampler_type(dim, is_shadow, is_array,
glsl_get_base_type(sampled_type));
} else if (sampled == 2) {
- assert(format);
+ assert((dim == GLSL_SAMPLER_DIM_SUBPASS) || format);
assert(!is_shadow);
val->type->type = glsl_image_type(dim, is_array,
glsl_get_base_type(sampled_type));