[Mesa-dev] [PATCH 07/22] i965/fs: fix dst stride in IVB/VLV type conversions

Matt Turner mattst88 at gmail.com
Thu Jan 12 23:17:41 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>
>
> When converting a DF to F, we set dst stride to 2, to fulfil alignment
> restrictions.
>
> But in IVB/VLV, this is not necessary, as each DF conversion already
> writes 2 F, the first one the real value, and the second one a 0. That
> is, IVB/VLV already set stride = 2 implicitly, so we must set it to 1
> explicitly to avoid ending up with stride = 4.
> ---
>  src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> index ac2d8ad..6967584 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> @@ -1634,6 +1634,16 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
>                 inst->src[i].type != BRW_REGISTER_TYPE_UD ||
>                 !inst->src[i].negate);
>        }
> +      /* When converting from DF->F, we set destination's stride as 2 as an
> +       * aligment requirement. But in IVB/VLV, each DF implicitly writes 2 F,

Typo: alignment


More information about the mesa-dev mailing list