[Mesa-dev] [PATCH 2/4] radeonsi: use bounded indexing for samplers

Marek Olšák maraeo at gmail.com
Tue Apr 5 13:56:48 UTC 2016


Bas, feel free to push patches 1 & 2.

Marek

On Mon, Apr 4, 2016 at 10:56 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> Patches 1 & 2 are
>
> Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> On 04.04.2016 06:41, Bas Nieuwenhuizen wrote:
>>
>> Signed-off-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
>> ---
>>   src/gallium/drivers/radeonsi/si_shader.c | 5 ++++-
>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/gallium/drivers/radeonsi/si_shader.c
>> b/src/gallium/drivers/radeonsi/si_shader.c
>> index dd04748..392f439 100644
>> --- a/src/gallium/drivers/radeonsi/si_shader.c
>> +++ b/src/gallium/drivers/radeonsi/si_shader.c
>> @@ -3781,7 +3781,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);
>>
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list