mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
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 in32ae8d3b32. 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@whitecape.org> (cherry picked from commitb9b033d8e4) Conflicts: 9.0 doesn't have the MOV() helper. Convert to old style.
This commit is contained in:
parent
a474b455ac
commit
0ba14013f6
1 changed files with 1 additions and 0 deletions
|
|
@ -201,6 +201,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(BRW_OPCODE_MOV, this->result, src);
|
||||
inst->saturate = true;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue