From: Marek Olšák Date: Sat, 5 Nov 2016 17:16:16 +0000 (+0100) Subject: tgsi/scan: fix images_buffers regression X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f864547fa92262f4b2c65a047210ee41e5b45e9a;p=mesa.git 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 Reviewed-by: Nicolai Hähnle --- 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; } } }