nir/spirv: do not require a format with images that are not sampled
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 14 Feb 2017 10:32:18 +0000 (11:32 +0100)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 14 Feb 2017 16:16:52 +0000 (08:16 -0800)
As soon as we support shaderStorageImageWriteWithoutFormat we can see
write-only images (sampled == 2) that don't have a format specified.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/spirv_to_nir.c

index 416e12a495349d46cd0bc252fd1239266a2deb43..db3a19fb49ef44923c9995f45b74e9646fcc48c3 100644 (file)
@@ -874,8 +874,6 @@ 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((dim == GLSL_SAMPLER_DIM_SUBPASS ||
-                 dim == GLSL_SAMPLER_DIM_SUBPASS_MS) || format);
          assert(!is_shadow);
          val->type->type = glsl_image_type(dim, is_array,
                                            glsl_get_base_type(sampled_type));