glsl: make component_slots() returns 1 for sampler types
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 20 Apr 2017 17:02:27 +0000 (19:02 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 21 Apr 2017 08:08:04 +0000 (10:08 +0200)
commit4a0aa0b3b3c07469aeef5d627f63adda6f5bcf5a
treee256688dc11863786c9bba3cca5102ffdc257014
parent29582dd20c1bc54ef5f481a955862bbf48d61c90
glsl: make component_slots() returns 1 for sampler types

It looks inconsistent to return 1 for image types and 0 for
sampler types. Especially because component_slots() is mostly
used by values_for_type() which always returns 1 for samplers.

For bindless, this value will be bumped to 2 because the
ARB_bindless_texture states that bindless samplers/images
should consume two components.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/compiler/glsl_types.cpp