On Thu, Mar 17, 2016 at 10:21 AM, Jason Ekstrand <[email protected]> wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_vec4.cpp | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp 
> b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> index 155a550..02a00b3 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> @@ -384,7 +384,13 @@ vec4_visitor::opt_vector_float()
>           continue;
>        }
>
> -      int vf = brw_float_to_vf(inst->src[0].f);
> +      float f = inst->src[0].f;
> +      if (inst->saturate) {
> +         assert(inst->dst.type == BRW_REGISTER_TYPE_F);
> +         f = CLAMP(f, 0.0f, 1.0f);
> +      }
> +
> +      int vf = brw_float_to_vf(f);
>        if (vf == -1)
>           continue;

Presumably the previous patch is to allow this to happen without
thinking about types.

This does look like a legitimate bug fix, but what does this fix or enable?
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to