radeonsi: use bounded indexing for samplers

Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Bas Nieuwenhuizen
2016-04-03 11:45:02 +02:00
parent 713353db18
commit 799789ba99
+4 -1
View File
@@ -3357,7 +3357,10 @@ static void tex_fetch_ptrs(
const struct tgsi_full_src_register *reg = &emit_data->inst->Src[sampler_src];
LLVMValueRef ind_index;
ind_index = get_indirect_index(ctx, &reg->Indirect, reg->Register.Index);
ind_index = get_bounded_indirect_index(ctx,
&reg->Indirect,
reg->Register.Index,
SI_NUM_USER_SAMPLERS);
*res_ptr = get_sampler_desc(ctx, ind_index, DESC_IMAGE);