Mesa (master): glsl: allow glsl_type::sampler_index() with images

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Thu Mar 30 11:17:02 UTC 2017


Module: Mesa
Branch: master
Commit: 784d3a70669e57a469614ff4c60339f770a5152a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=784d3a70669e57a469614ff4c60339f770a5152a

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Thu Mar 30 00:33:15 2017 +0200

glsl: allow glsl_type::sampler_index() with images

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

---

 src/compiler/glsl_types.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp
index 13e47f76f7..db65bb0e00 100644
--- a/src/compiler/glsl_types.cpp
+++ b/src/compiler/glsl_types.cpp
@@ -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:




More information about the mesa-commit mailing list