projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56b57aa
)
glsl_to_tgsi: emit IABS for absolute value of integers
author
Bryan Cain
<bryancain3@gmail.com>
Sat, 7 Jan 2012 22:19:39 +0000
(16:19 -0600)
committer
Bryan Cain
<bryancain3@gmail.com>
Sat, 7 Jan 2012 22:20:28 +0000
(16:20 -0600)
src/mesa/state_tracker/st_glsl_to_tgsi.cpp
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 539701173f8fd4f4fd6230adf93dacabf0329bc7..3b8e2fe3742c116f8a8b08a43a01daea4a5c4c0c 100644
(file)
--- a/
src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/
src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@
-1410,8
+1410,10
@@
glsl_to_tgsi_visitor::visit(ir_expression *ir)
}
break;
case ir_unop_abs:
- assert(result_dst.type == GLSL_TYPE_FLOAT);
- emit(ir, TGSI_OPCODE_ABS, result_dst, op[0]);
+ if (result_dst.type == GLSL_TYPE_INT || result_dst.type == GLSL_TYPE_UINT)
+ emit(ir, TGSI_OPCODE_IABS, result_dst, op[0]);
+ else
+ emit(ir, TGSI_OPCODE_ABS, result_dst, op[0]);
break;
case ir_unop_sign:
emit(ir, TGSI_OPCODE_SSG, result_dst, op[0]);