nir: Allow a non-existent sampler deref in nir_lower_samplers_as_deref
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 10 Jan 2019 19:10:13 +0000 (11:10 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 11 Jan 2019 15:54:32 +0000 (07:54 -0800)
commitae683ed3bce6ae7d22fcc8e5ef844b1e0f26b93b
tree7c52c9dbdb430cab6e76da3eee5848bc0f3acfea
parente12b0b5c6d0e957388b3f902d064e800decfa603
nir: Allow a non-existent sampler deref in nir_lower_samplers_as_deref

GL_ARB_gl_spirv does not provide a sampler deref for e.g. texelFetch(),
so we can't assume that both are present and identical.  Simply lower
each if it is present.

Fixes regressions in GL_ARB_gl_spirv tests since I switched everyone to
using this pass.  Thanks to Alejandro Piñeiro for catching these.

Fixes: f003859f97c nir: Make gl_nir_lower_samplers use gl_nir_lower_samplers_as_deref
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Alejandro Piñeiro <apinheiro@igalia.com>
src/compiler/glsl/gl_nir_lower_samplers_as_deref.c