diff options
author | marha <marha@users.sourceforge.net> | 2014-09-08 23:30:36 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-09-08 23:30:36 +0200 |
commit | e16399e57caac9e859a7d28921c73ef9839b571e (patch) | |
tree | b86ed43f749ebfe0bb3842fcd76a34e386011fcc /mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | |
parent | 166caebfaa2b217332a345ffb02c5b9e52f65a3d (diff) | |
parent | cb346e228aeb500cd61ec86644c034c238332d3b (diff) | |
download | vcxsrv-e16399e57caac9e859a7d28921c73ef9839b571e.tar.gz vcxsrv-e16399e57caac9e859a7d28921c73ef9839b571e.tar.bz2 vcxsrv-e16399e57caac9e859a7d28921c73ef9839b571e.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index dd9c84f1a..62e4101d1 100644 --- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -3091,8 +3091,18 @@ glsl_to_tgsi_visitor::visit(ir_discard *ir) { if (ir->condition) { ir->condition->accept(this); - this->result.negate = ~this->result.negate; - emit(ir, TGSI_OPCODE_KILL_IF, undef_dst, this->result); + st_src_reg condition = this->result; + + /* Convert the bool condition to a float so we can negate. */ + if (native_integers) { + st_src_reg temp = get_temp(ir->condition->type); + emit(ir, TGSI_OPCODE_AND, st_dst_reg(temp), + condition, st_src_reg_for_float(1.0)); + condition = temp; + } + + condition.negate = ~condition.negate; + emit(ir, TGSI_OPCODE_KILL_IF, undef_dst, condition); } else { /* unconditional kil */ emit(ir, TGSI_OPCODE_KILL); |