[Mesa-dev] [PATCH 7/9] i965: Add mask_control_ex field and handle it in compaction.

Iago Toral itoral at igalia.com
Tue Oct 20 23:46:25 PDT 2015


On Mon, 2015-10-19 at 21:09 -0700, Matt Turner wrote:
> Documentation is sparse, but it appears to have existed on G45 and ILK
> as a second bit extension of the mask_control field. Setting the pair of
> bits to 0b11 enables "NoCMask".

It shows up in the compacted table for g45 in bit 23, but bit 28 of
regular instructions seems to be unused as per this document:
https://01.org/sites/default/files/documentation/g45_vol_4_subsystem_0.pdf

There are references to that extension bit in the docs though so I guess
this is another documentation bug? Of course ILK does not have any
mentions to this, but I guess that is not surprising.

I have to ask though, how did you find/verify this? :)

Iago

> ---
>  src/mesa/drivers/dri/i965/brw_eu_compact.c | 4 ++++
>  src/mesa/drivers/dri/i965/brw_inst.h       | 2 ++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c
> index b122dec..f787ea3 100644
> --- a/src/mesa/drivers/dri/i965/brw_eu_compact.c
> +++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c
> @@ -1018,6 +1018,8 @@ brw_try_compact_instruction(const struct brw_device_info *devinfo,
>  
>     if (devinfo->gen >= 6) {
>        compact(acc_wr_control);
> +   } else {
> +      compact(mask_control_ex);
>     }
>  
>     compact(cond_modifier);
> @@ -1229,6 +1231,8 @@ brw_uncompact_instruction(const struct brw_device_info *devinfo, brw_inst *dst,
>  
>     if (devinfo->gen >= 6) {
>        uncompact(acc_wr_control);
> +   } else {
> +      uncompact(mask_control_ex);
>     }
>  
>     uncompact(cond_modifier);
> diff --git a/src/mesa/drivers/dri/i965/brw_inst.h b/src/mesa/drivers/dri/i965/brw_inst.h
> index cb3d7e6..819ce59 100644
> --- a/src/mesa/drivers/dri/i965/brw_inst.h
> +++ b/src/mesa/drivers/dri/i965/brw_inst.h
> @@ -182,6 +182,7 @@ F(debug_control,        30,  30)
>  F(cmpt_control,         29,  29)
>  FC(branch_control,      28,  28, devinfo->gen >= 8)
>  FC(acc_wr_control,      28,  28, devinfo->gen >= 6)
> +FC(mask_control_ex,     28,  28, devinfo->is_g4x || devinfo->gen == 5)
>  F(cond_modifier,        27,  24)
>  FC(math_function,       27,  24, devinfo->gen >= 6)
>  F(exec_size,            23,  21)
> @@ -792,6 +793,7 @@ F(cmpt_control,     29, 29) /* Same location as brw_inst */
>  FC(flag_subreg_nr,  28, 28, devinfo->gen <= 6)
>  F(cond_modifier,    27, 24) /* Same location as brw_inst */
>  FC(acc_wr_control,  23, 23, devinfo->gen >= 6)
> +FC(mask_control_ex, 23, 23, devinfo->is_g4x || devinfo->gen == 5)
>  F(subreg_index,     22, 18)
>  F(datatype_index,   17, 13)
>  F(control_index,    12,  8)




More information about the mesa-dev mailing list