summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-07-31 17:08:46 -0700
committerEric Anholt <[email protected]>2015-08-04 17:19:01 -0700
commit63eac5de8fd0e091d07f866a42584c057ca4bfa9 (patch)
tree6318cac05836a98b4913dc615fee312f71b970b8
parentcc8fb2904673588d31b660dbfaf692615b5202dd (diff)
vc4: Don't bother saturating the dst color for blending.
Since we just pulled it out of the destination as 8-bit unorm, we know it's in [0, 1] already. shader-db: total instructions in shared programs: 100040 -> 98208 (-1.83%) instructions in affected programs: 14084 -> 12252 (-13.01%)
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 5e2a3f448a0..d6c60739e93 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1130,14 +1130,8 @@ vc4_blend(struct vc4_compile *c, struct qreg *result,
return;
}
- struct qreg clamped_src[4];
- struct qreg clamped_dst[4];
- for (int i = 0; i < 4; i++) {
- clamped_src[i] = qir_SAT(c, src_color[i]);
- clamped_dst[i] = qir_SAT(c, dst_color[i]);
- }
- src_color = clamped_src;
- dst_color = clamped_dst;
+ for (int i = 0; i < 4; i++)
+ src_color[i] = qir_SAT(c, src_color[i]);
struct qreg src_blend[4], dst_blend[4];
for (int i = 0; i < 3; i++) {