[Mesa-dev] [PATCH 1/2] tgsi/scan: fix images_buffers regressions
Marek Olšák
maraeo at gmail.com
Sat Nov 5 17:38:40 UTC 2016
From: Marek Olšák <marek.olsak at amd.com>
The first IF statement disabled the second one.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98599
---
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
@@ -465,20 +465,22 @@ scan_declaration(struct tgsi_shader_info *info,
int buffer = 0;
if (fulldecl->Declaration.Dimension)
buffer = fulldecl->Dim.Index2D;
info->const_file_max[buffer] =
MAX2(info->const_file_max[buffer], (int)reg);
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) {
info->input_semantic_name[reg] = (ubyte) semName;
info->input_semantic_index[reg] = (ubyte) semIndex;
info->input_interpolate[reg] = (ubyte)fulldecl->Interp.Interpolate;
info->input_interpolate_loc[reg] = (ubyte)fulldecl->Interp.Location;
info->input_cylindrical_wrap[reg] = (ubyte)fulldecl->Interp.CylindricalWrap;
/* Vertex shaders can have inputs with holes between them. */
@@ -586,23 +588,20 @@ scan_declaration(struct tgsi_shader_info *info,
assert(target < TGSI_TEXTURE_UNKNOWN);
if (info->sampler_targets[reg] == TGSI_TEXTURE_UNKNOWN) {
/* Save sampler target for this sampler index */
info->sampler_targets[reg] = target;
info->sampler_type[reg] = type;
} else {
/* if previously declared, make sure targets agree */
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;
}
}
}
static void
scan_immediate(struct tgsi_shader_info *info)
{
uint reg = info->immediate_count++;
uint file = TGSI_FILE_IMMEDIATE;
--
2.7.4
More information about the mesa-dev
mailing list