[Mesa-dev] [PATCH v3 01/12] i965: Don't copy propagate constants from sources with saturate

Jason Ekstrand jason at jlekstrand.net
Fri Dec 5 13:10:36 PST 2014


On Thu, Dec 4, 2014 at 10:02 PM, Kristian Høgsberg <krh at bitplanet.net>
wrote:

> We don't propagate the saturate bit and some instructions can't
> saturate at all.  If the source has saturate set, just skip propagation.
>

I think the commit message could use some help.

The real point is that copy propagation propagates into sources but sat is
a destination modier.  The only way you can propagate a mov.sat is into
another mov by making it a mov.sat.


>
> Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>
> ---
>  src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> index e1989cb..611cff1 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> @@ -425,6 +425,8 @@ fs_visitor::try_constant_propagate(fs_inst *inst,
> acp_entry *entry)
>
>     if (entry->src.file != IMM)
>        return false;
> +   if (entry->saturate)
> +      return false;
>
>     for (int i = inst->sources - 1; i >= 0; i--) {
>        if (inst->src[i].file != GRF)
> --
> 2.2.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141205/848344a1/attachment.html>


More information about the mesa-dev mailing list