Mesa (master): i965/fs: Don' t generate saturates over existing variable values.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Nov 28 19:46:31 UTC 2012
Module: Mesa
Branch: master
Commit: b9b033d8e456228fb05c5e28f85323de40f3292f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9b033d8e456228fb05c5e28f85323de40f3292f
Author: Eric Anholt <eric at anholt.net>
Date: Mon Nov 26 14:22:12 2012 -0800
i965/fs: Don't generate saturates over existing variable values.
Fixes a crash in http://workshop.chromeexperiments.com/stars/ on i965,
and the new piglit test glsl-fs-clamp-5.
We were trying to emit a saturating move into a uniform, which the code
generator appropriately choked on. This was broken in the change in
32ae8d3b321185a85b73ff703d8fc26bd5f48fa7.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57166
NOTE: This is a candidate for the 9.0 branch.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index d548709..571489c 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -217,6 +217,7 @@ fs_visitor::try_emit_saturate(ir_expression *ir)
*/
fs_inst *modify = get_instruction_generating_reg(pre_inst, last_inst, src);
if (!modify || modify->regs_written() != 1) {
+ this->result = fs_reg(this, ir->type);
fs_inst *inst = emit(MOV(this->result, src));
inst->saturate = true;
} else {
More information about the mesa-commit
mailing list