[Mesa-dev] [PATCH 2/4] intel/compiler: Don't propagate cmod into integer multiplies
Matt Turner
mattst88 at gmail.com
Thu Oct 5 05:35:09 UTC 2017
On Wed, Oct 4, 2017 at 4:58 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> No shader-db change on Sky Lake.
>
> Cc: mesa-stable at lists.freedesktop.org
> ---
> src/intel/compiler/brw_fs_cmod_propagation.cpp | 17 +++++++++++++++++
> src/intel/compiler/brw_vec4_cmod_propagation.cpp | 17 +++++++++++++++++
> 2 files changed, 34 insertions(+)
>
> diff --git a/src/intel/compiler/brw_fs_cmod_propagation.cpp b/src/intel/compiler/brw_fs_cmod_propagation.cpp
> index db63e94..e8f1069 100644
> --- a/src/intel/compiler/brw_fs_cmod_propagation.cpp
> +++ b/src/intel/compiler/brw_fs_cmod_propagation.cpp
> @@ -150,6 +150,23 @@ opt_cmod_propagation_local(const gen_device_info *devinfo, bblock_t *block)
> if (scan_inst->saturate)
> break;
>
> + /* From the Sky Lake PRM, Vol 2a, "Multiply":
> + *
> + * "When multiplying integer data types, if one of the sources
> + * is a DW, the resulting full precision data is stored in
> + * the accumulator. However, if the destination data type is
> + * either W or DW, the low bits of the result are written to
> + * the destination register and the remaining high bits are
> + * discarded. This results in undefined Overflow and Sign
> + * flags. Therefore, conditional modifiers and saturation
> + * (.sat) cannot be used in this case.
Please indent the lines in the block quote one space more than the "
Patches 1-2 are
Reviewed-by: Matt Turner <mattst88 at gmail.com>
More information about the mesa-dev
mailing list