summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-07-05 23:32:06 -0400
committerIlia Mirkin <[email protected]>2014-07-24 08:26:41 -0400
commit9c4959d0df524cf81395de59f15a4a1b19073aed (patch)
tree93837ebe3b9ff37538d6fd0530a48439c7095eea /src/mesa
parentdfb0ca16065c1d251101bb094f2cfd08cf3cda15 (diff)
mesa/st: add support for interpolate_at_* ops
Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 5c51e63d9a8..5ea14654769 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -2028,6 +2028,15 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir)
*/
emit(ir, TGSI_OPCODE_MAD, result_dst, op[0], op[1], op[2]);
break;
+ case ir_unop_interpolate_at_centroid:
+ emit(ir, TGSI_OPCODE_INTERP_CENTROID, result_dst, op[0]);
+ break;
+ case ir_binop_interpolate_at_offset:
+ emit(ir, TGSI_OPCODE_INTERP_OFFSET, result_dst, op[0], op[1]);
+ break;
+ case ir_binop_interpolate_at_sample:
+ emit(ir, TGSI_OPCODE_INTERP_SAMPLE, result_dst, op[0], op[1]);
+ break;
case ir_unop_pack_snorm_2x16:
case ir_unop_pack_unorm_2x16:
case ir_unop_pack_half_2x16:
@@ -2049,9 +2058,6 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir)
case ir_binop_ldexp:
case ir_binop_carry:
case ir_binop_borrow:
- case ir_unop_interpolate_at_centroid:
- case ir_binop_interpolate_at_offset:
- case ir_binop_interpolate_at_sample:
/* This operation is not supported, or should have already been handled.
*/
assert(!"Invalid ir opcode in glsl_to_tgsi_visitor::visit()");