[Mesa-dev] [PATCH 077/140] radeonsi/gfx9: Gather4 no longer needs the workaround
Marek Olšák
maraeo at gmail.com
Mon Mar 20 22:43:27 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_shader.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index b5cb41d..a6f4ce9 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -4795,21 +4795,22 @@ static void build_tex_intrinsic(const struct lp_build_tgsi_action *action,
case TGSI_OPCODE_TG4:
args.opcode = ac_image_gather4;
args.level_zero = true;
break;
default:
assert(0);
return;
}
/* The hardware needs special lowering for Gather4 with integer formats. */
- if (opcode == TGSI_OPCODE_TG4) {
+ if (ctx->screen->b.chip_class <= VI &&
+ opcode == TGSI_OPCODE_TG4) {
struct tgsi_shader_info *info = &ctx->shader->selector->info;
/* This will also work with non-constant indexing because of how
* glsl_to_tgsi works and we intent to preserve that behavior.
*/
const unsigned src_idx = 2;
unsigned sampler = inst->Src[src_idx].Register.Index;
assert(inst->Src[src_idx].Register.File == TGSI_FILE_SAMPLER);
if (info->sampler_type[sampler] == TGSI_RETURN_TYPE_SINT ||
--
2.7.4
More information about the mesa-dev
mailing list