diff options
author | Samuel Pitoiset <[email protected]> | 2017-05-17 10:55:51 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-05-18 21:48:16 +0200 |
commit | 1468e29e0285e8878c6112f810fae5ab87c426e9 (patch) | |
tree | 3a942d38ef9d20437ecc0f9e106ef2be8c51e789 /src | |
parent | 5cb2eee5573b69311da95454be1431e536212fbb (diff) |
radeonsi: get the sampler view type from inst->Texture for TG4
This will also magically fix this special lowering for
bindless samplers.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c index 13b46949d01..a47d5bbae3b 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c @@ -1772,17 +1772,13 @@ static void build_tex_intrinsic(const struct lp_build_tgsi_action *action, /* The hardware needs special lowering for Gather4 with integer formats. */ 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); + assert(inst->Texture.ReturnType != TGSI_RETURN_TYPE_UNKNOWN); - if (info->sampler_type[sampler] == TGSI_RETURN_TYPE_SINT || - info->sampler_type[sampler] == TGSI_RETURN_TYPE_UINT) + if (inst->Texture.ReturnType == TGSI_RETURN_TYPE_SINT || + inst->Texture.ReturnType == TGSI_RETURN_TYPE_UINT) si_lower_gather4_integer(ctx, &args, target); } |