[Mesa-dev] [PATCH v2 4/8] i965/fs: Don't uniformize surface index twice

Kristian Høgsberg krh at bitplanet.net
Thu Oct 22 12:15:21 PDT 2015


On Thu, Oct 22, 2015 at 12:11 PM, Matt Turner <mattst88 at gmail.com> wrote:
> On Thu, Oct 22, 2015 at 11:36 AM, Kristian Høgsberg Kristensen
> <krh at bitplanet.net> wrote:
>> The emit_untyped_read and emit_untyped_write helpers already uniformize
>> the surface index argument. No need to do it before calling them.
>>
>> Signed-off-by: Kristian Høgsberg Kristensen <krh at bitplanet.net>
>> ---
>>  src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
>> index 5dc63c9..00f200a 100644
>> --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
>> @@ -1511,7 +1511,6 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
>>           surf_index = vgrf(glsl_type::uint_type);
>>           bld.ADD(surf_index, get_nir_src(instr->src[0]),
>>                   fs_reg(stage_prog_data->binding_table.ssbo_start));
>> -         surf_index = bld.emit_uniformize(surf_index);
>
> Looks correct -- I see that emit_send() does call uniformize.
>
> But when this was added in commit b234537, it apparently fixed piglit
> tests. Presumably we gained an additional uniformize in the transition
> to the builder infrastructure, making this one no longer necessary?
>
> If that's correct,

Yup, that was for UBOs which don't go through the surface builder infrastructure

Kristian.

> Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list