Skip to content
Snippets Groups Projects
Commit 2d64d34c authored by Paul Berry's avatar Paul Berry Committed by Ian Romanick
Browse files

i965: vs optimization fix: Check val.{negate,abs} in accumulator_contains()


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 or
val.abs flags.  As a result, if the desired value was the negation, or
the absolute value, of what was already in the accumulator, we would
generate an incorrect shader.

Fixes piglit test vs-refract-vec4-vec4-float.

Tested on Gen5 and Gen6.

Reviewed-by: default avatarEric Anholt <eric@anholt.net>
(cherry picked from commit d92463d5)
parent 66b41af3
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment