From f864547fa92262f4b2c65a047210ee41e5b45e9a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 5 Nov 2016 18:16:16 +0100 Subject: [PATCH] tgsi/scan: fix images_buffers regression MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The first IF statement disabled the second one. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98599 Reviewed-by: Brian Paul Reviewed-by: Nicolai Hähnle --- 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 aeb326a8bfe..26cb2beaceb 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; } } } -- 2.30.2