[Mesa-dev] [PATCH] nir/spirv: do not require a format with images that are not sampled

Iago Toral itoral at igalia.com
Tue Feb 14 10:35:08 UTC 2017


On Tue, 2017-02-14 at 11:32 +0100, Iago Toral Quiroga wrote:
> As soon as we support shaderStorageImageWriteWithoutFormat we can see
> write-only images (sampled == 2) that don't have a format specified.
> ---

I didn't do a thorough testing yet, but I caught this immediately after
modifying an existing CTS image store test by removing the image
format. The same test passes with Alex's patches if we drop the
assertion.

Iago

>  src/compiler/spirv/spirv_to_nir.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/src/compiler/spirv/spirv_to_nir.c
> b/src/compiler/spirv/spirv_to_nir.c
> index 416e12a..db3a19f 100644
> --- a/src/compiler/spirv/spirv_to_nir.c
> +++ b/src/compiler/spirv/spirv_to_nir.c
> @@ -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(samp
> led_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(sample
> d_type));


More information about the mesa-dev mailing list