[Mesa-dev] [PATCH 09/10] i965/fs: Do not mark used surfaces in FS_OPCODE_GET_BUFFER_SIZE

Francisco Jerez currojerez at riseup.net
Fri Oct 30 06:42:01 PDT 2015


Iago Toral Quiroga <itoral at igalia.com> writes:

> Do it in the visitor, like we do for other opcodes.
> ---
>  src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 --
>  src/mesa/drivers/dri/i965/brw_fs_nir.cpp       | 5 ++++-
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> index fbc2ea4..aafac99 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> @@ -661,8 +661,6 @@ fs_generator::generate_get_buffer_size(fs_inst *inst,
>                inst->header_size > 0,
>                simd_mode,
>                BRW_SAMPLER_RETURN_FORMAT_SINT32);
> -
> -   brw_mark_surface_used(prog_data, surf_index.dw1.ud);
>  }
>  
>  void
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> index 1298148..a8ddf3a 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> @@ -1886,12 +1886,15 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
>                                    BRW_REGISTER_TYPE_UD);
>        bld.LOAD_PAYLOAD(src_payload, &source, 1, 0);
>  
> -      fs_reg surf_index = fs_reg(prog_data->binding_table.ssbo_start + ssbo_index);
> +      unsigned index = prog_data->binding_table.ssbo_start + ssbo_index;
> +      fs_reg surf_index = fs_reg(index);
>        fs_inst *inst = bld.emit(FS_OPCODE_GET_BUFFER_SIZE, dest,
>                                 src_payload, surf_index);
>        inst->header_size = 0;
>        inst->mlen = mlen;
>        bld.emit(inst);
> +
> +      brw_mark_surface_used(prog_data, index);

If you make the same change as in the last patch:
Reviewed-by: Francisco Jerez <currojerez at riseup.net>

>        break;
>     }
>  
> -- 
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151030/e539a42e/attachment-0001.sig>


More information about the mesa-dev mailing list