<div dir="ltr"><div>Series is<br><br></div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>><br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 4, 2018 at 10:45 AM, Matt Turner <span dir="ltr"><<a href="mailto:mattst88@gmail.com" target="_blank">mattst88@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, May 4, 2018 at 4:10 AM, Iago Toral Quiroga <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>> wrote:<br>
> From: Jose Maria Casanova Crespo <<a href="mailto:jmcasanova@igalia.com">jmcasanova@igalia.com</a>><br>
><br>
> For 8-bit types the execution type is word. A byte raw MOV has 16-bit<br>
> execution type and 8-bit destination and it shouldn't be considered<br>
> a conversion case. So there is no need to change alignment and enter<br>
> in lower_conversions for these instructions.<br>
><br>
> Fixes a regresion in the piglit test "glsl-fs-shader-stencil-<wbr>export"<br>
> that is introduced with this patch from the Vulkan shaderInt16 series:<br>
> 'i965/compiler: handle conversion to smaller type in the lowering<br>
> pass for that'. The problem is caused because there is already a case<br>
> in the driver that injects Byte instructions like this:<br>
><br>
> mov(8) g127<1>UB g2<32,8,4>UB<br>
><br>
> And the aforementioned pass was not accounting for the special<br>
> handling of the execution size of Byte instructions. This patch<br>
> fixes this.<br>
><br>
> v2: (Jason Ekstrand)<br>
> - Simplify is_byte_raw_mov, include reference to PRM and not<br>
> consider B <-> UB conversions as raw movs.<br>
><br>
> Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=106393" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/<wbr>show_bug.cgi?id=106393</a><br>
> ---<br>
> src/intel/compiler/brw_fs_<wbr>lower_conversions.cpp | 21 ++++++++++++++++++++-<br>
> 1 file changed, 20 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/src/intel/compiler/brw_fs_<wbr>lower_conversions.cpp b/src/intel/compiler/brw_fs_<wbr>lower_conversions.cpp<br>
> index f95b39d3e8..f6c936cf21 100644<br>
> --- a/src/intel/compiler/brw_fs_<wbr>lower_conversions.cpp<br>
> +++ b/src/intel/compiler/brw_fs_<wbr>lower_conversions.cpp<br>
> @@ -43,6 +43,24 @@ supports_type_conversion(const fs_inst *inst) {<br>
> }<br>
> }<br>
><br>
> +/* From the SKL PRM Vol 2a, "Move":<br>
> + *<br>
> + * "A mov with the same source and destination type, no source modifier,<br>
> + * and no saturation is a raw move. A packed byte destination region (B<br>
> + * or UB type with HorzStride == 1 and ExecSize > 1) can only be written<br>
> + * using raw move."<br>
> + */<br>
<br>
</div></div>Indent the last three lines one more space to align vertically with<br>
the first line.<br>
<span class=""><br>
> +static bool<br>
> +is_byte_raw_mov (const fs_inst *inst)<br>
> +{<br>
> + return type_sz(inst->dst.type) == 1 &&<br>
> + inst->opcode == BRW_OPCODE_MOV &&<br>
> + inst->src[0].type == inst->dst.type &&<br>
> + !inst->saturate &&<br>
> + !inst->src[0].negate &&<br>
> + !inst->src[0].abs;<br>
<br>
</span>And indent these to align vertically as well.<br>
<br>
The first three patches are<br>
<br>
Reviewed-by: Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>><br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div><br></div>