On Fri, 22 Jul 2011 15:07:57 -0700, Paul Berry <stereotype...@gmail.com> wrote:
> When emitting a MAC instruction in a vertex shader, brw_vs_emit()
> calls accumulator_contains() to determine whether the accumulator
> already contains the appropriate addend; if it does, then we can avoid
> emitting an unnecessary MOV instruction.
> 
> However, accumulator_contains() wasn't checking the val.negate flag.
> As a result, if the accumulator contained the negation of the desired
> value, we would generate an incorrect shader.
> 
> Fixes piglit test vs-refract-vec4-vec4-float.
> 
> Tested on Gen5 and Gen6.

Looks like val.abs doesn't currently need this treatement because we
never generate regs with it where they'd appear as the arg to MAD.

Reviewed-by: Eric Anholt <e...@anholt.net>

Attachment: pgp63mL24MHb0.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to