nir/opt_deref: Remove certain sampler type casts
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 22 Apr 2020 20:47:28 +0000 (15:47 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 24 Apr 2020 09:43:21 +0000 (09:43 +0000)
commita1a08a58025a6026aae0f73b67451198f5befb42
tree6ce1fa364d7a5242d777b823fe16aee43a6ce064
parentf4addfdde39070879ed8b1f08fe3bd85f2b0e392
nir/opt_deref: Remove certain sampler type casts

The SPIR-V parser sometimes generates casts from specific sampler types
like sampler2D to the bare sampler type.  This results in a cast which
causes heartburn for drivers but is harmless to remove.

cc: mesa-stable@lists.freedesktop.org

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4684>
src/compiler/nir/nir_deref.c