[Mesa-dev] [PATCH 58/59] i965/fs: take into account doubles when calculating read_size for MOV_INDIRECT

Pohjolainen, Topi topi.pohjolainen at intel.com
Mon May 2 12:33:34 UTC 2016


On Fri, Apr 29, 2016 at 01:29:55PM +0200, Samuel Iglesias Gons?lvez wrote:
> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
> ---
>  src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 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 87e098a..4cd219a 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> @@ -2924,9 +2924,9 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
>            * component from running past, we subtract off the size of all but
>            * one component of the vector.
>            */
> -         assert(instr->const_index[1] >= instr->num_components * 4);
> +         assert(instr->const_index[1] >= instr->num_components * (int) type_sz(dest.type));

Overflowing line, perhaps instead:

            assert(instr->const_index[1] >=
                   instr->num_components * (int) type_sz(dest.type));

>           unsigned read_size = instr->const_index[1] -
> -                              (instr->num_components - 1) * 4;
> +            (instr->num_components - 1) * type_sz(dest.type);
>  
>           for (unsigned j = 0; j < instr->num_components; j++) {
>              bld.emit(SHADER_OPCODE_MOV_INDIRECT,
> -- 
> 2.5.0
> 
> _______________________________________________
> 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