[Mesa-dev] [PATCH 08/22] i965/fs: fix lower SIMD width for IVB/VLV's MOVE_INDIRECT
Matt Turner
mattst88 at gmail.com
Thu Jan 12 23:24:54 UTC 2017
On Thu, Jan 5, 2017 at 5:07 AM, Samuel Iglesias Gonsálvez
<siglesias at igalia.com> wrote:
> From: "Juan A. Suarez Romero" <jasuarez at igalia.com>
>
s/MOVE_INDIRECT/MOV_INDIRECT/ in the subject
> Previous to Broadwell, we have 8 registers for MOV_INDIRECT. But if
> IVB/VLV deal with DFs, we will duplicate the exec_size from 8 to 16.
>
> This patch limits the SIMD width to 4 in this case.
> ---
> src/mesa/drivers/dri/i965/brw_fs.cpp | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index cfce364..45d320d 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -4959,8 +4959,13 @@ get_lowered_simd_width(const struct gen_device_info *devinfo,
> return MIN2(8, inst->exec_size);
>
> case SHADER_OPCODE_MOV_INDIRECT:
> - /* Prior to Broadwell, we only have 8 address subregisters */
> - return MIN3(devinfo->gen >= 8 ? 16 : 8,
> + /* Prior to Broadwell, we only have 8 address subregisters. Special case
> + * for IVB/VLV and DF types: set to 4 (exec_size will be later
> + * duplicated).
> + */
> + return MIN3(devinfo->gen >= 8 ? 16 : ((devinfo->gen == 7 &&
> + !devinfo->is_haswell &&
> + inst->exec_data_size() == 8) ? 4 : 8),
This is getting complicated. Lets write this as
unsigned num_address_regs;
if (devinfo->gen >= 8) {
num_address_regs = 16;
} else if (devinfo->is_haswell || get_exec_type_size(inst) != 8) {
num_address_regs = 8;
} else {
num_address_regs = 4;
}
return MIN3(num_address_regs, ...)
More information about the mesa-dev
mailing list