glsl: allow glsl_type::sampler_index() with images
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 29 Mar 2017 22:33:15 +0000 (00:33 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 30 Mar 2017 11:15:16 +0000 (13:15 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/compiler/glsl_types.cpp

index 13e47f76f7a1d57a3c13e1d8113f1ffa59010ed6..db65bb0e00d4a2a101e55ce817ce3eadce96cf23 100644 (file)
@@ -300,7 +300,7 @@ glsl_type::sampler_index() const
 {
    const glsl_type *const t = (this->is_array()) ? this->fields.array : this;
 
-   assert(t->is_sampler());
+   assert(t->is_sampler() || t->is_image());
 
    switch (t->sampler_dimensionality) {
    case GLSL_SAMPLER_DIM_1D: