[Mesa-dev] [PATCH 02/17] i965/fs: Fix fs_inst::regs_read() for uniform pull constant loads

Iago Toral itoral at igalia.com
Fri Jun 19 02:50:19 PDT 2015


On Thu, 2015-06-18 at 17:50 -0700, Jason Ekstrand wrote:
> Previously, fs_inst::regs_read() fell back to depending on the register
> width for the second source.  This isn't really correct since it isn't a
> SIMD8 value at all, but a SIMD4x2 value.  This commit changes it to
> explicitly be always one register.

Right, in fact we were incorrectly computing a size of 2 registers in
SIMD16 executions because of this.

Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>

> ---
>  src/mesa/drivers/dri/i965/brw_fs.cpp | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index 37b6d0d..ce56657 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -763,6 +763,12 @@ fs_inst::regs_read(int arg) const
>           return exec_size / 4;
>        break;
>  
> +   case FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD_GEN7:
> +      /* The second argument is a single SIMD4x2 register */
> +      if (arg == 1)
> +         return 1;
> +      break;
> +
>     default:
>        if (is_tex() && arg == 0 && src[0].file == GRF)
>           return mlen;




More information about the mesa-dev mailing list