nir/lower_input_attachments: remove bogus assert in try_lower_input_texop()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 4 Mar 2020 08:06:45 +0000 (09:06 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 6 Mar 2020 09:13:40 +0000 (09:13 +0000)
It can be a sampler too.

Fixes: 84b08971fbd ("nir/lower_input_attachments: lower nir_texop_fragment_{mask}_fetch")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2558
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4043>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4043>

src/compiler/nir/nir_lower_input_attachments.c

index 72dd7afc33a15cdefdbaa7a051b7efbf7edeff82..16c7509f5f19f4fb9886abfc48e9a6dfba997a07 100644 (file)
@@ -131,7 +131,6 @@ try_lower_input_texop(nir_function_impl *impl, nir_tex_instr *tex,
                                                         bool use_fragcoord_sysval)
 {
    nir_deref_instr *deref = nir_src_as_deref(tex->src[0].src);
-   assert(glsl_type_is_image(deref->type));
 
    if (glsl_get_sampler_dim(deref->type) != GLSL_SAMPLER_DIM_SUBPASS_MS)
       return false;