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

Author: Marek Olšák <[email protected]>
Date:   Sat Nov  5 18:16:16 2016 +0100

tgsi/scan: fix images_buffers regression

The first IF statement disabled the second one.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98599

Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>

---

 src/gallium/auxiliary/tgsi/tgsi_scan.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c 
b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index aeb326a..26cb2be 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -472,6 +472,8 @@ scan_declaration(struct tgsi_shader_info *info,
          info->const_buffers_declared |= 1u << buffer;
       } else if (file == TGSI_FILE_IMAGE) {
          info->images_declared |= 1u << reg;
+         if (fulldecl->Image.Resource == TGSI_TEXTURE_BUFFER)
+            info->images_buffers |= 1 << reg;
       } else if (file == TGSI_FILE_BUFFER) {
          info->shader_buffers_declared |= 1u << reg;
       } else if (file == TGSI_FILE_INPUT) {
@@ -593,9 +595,6 @@ scan_declaration(struct tgsi_shader_info *info,
             assert(info->sampler_targets[reg] == target);
             assert(info->sampler_type[reg] == type);
          }
-      } else if (file == TGSI_FILE_IMAGE) {
-         if (fulldecl->Image.Resource == TGSI_TEXTURE_BUFFER)
-            info->images_buffers |= 1 << reg;
       }
    }
 }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to