[Mesa-dev] [PATCH v2 6/7] i965/fs/nir: Don't stomp 64-bit values to D in get_nir_src

Matt Turner mattst88 at gmail.com
Mon Aug 28 20:25:53 UTC 2017


On Mon, Aug 28, 2017 at 11:13 AM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> ---
>  src/intel/compiler/brw_fs_nir.cpp | 33 +++++++++++++++++++++------------
>  1 file changed, 21 insertions(+), 12 deletions(-)
>
> diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
> index c46998a..04deaed 100644
> --- a/src/intel/compiler/brw_fs_nir.cpp
> +++ b/src/intel/compiler/brw_fs_nir.cpp
> @@ -1438,11 +1438,19 @@ fs_visitor::get_nir_src(const nir_src &src)
>                     src.reg.base_offset * src.reg.reg->num_components);
>     }
>
> -   /* to avoid floating-point denorm flushing problems, set the type by
> -    * default to D - instructions that need floating point semantics will set
> -    * this to F if they need to
> -    */
> -   return retype(reg, BRW_REGISTER_TYPE_D);
> +   if (nir_src_bit_size(src) == 64 && devinfo->gen == 7) {
> +      /* The only 64-bit type available on gen7 is DF, so use that. */
> +      reg.type = BRW_REGISTER_TYPE_DF;
> +   } else {
> +      /* Do avoid floating-point denorm flushing problems, set the type by

s/Do/To/


More information about the mesa-dev mailing list