glsl_to_tgsi: don't create 64-bit integer MAD/FMA
authorRhys Perry <pendingchaos02@gmail.com>
Sat, 20 Oct 2018 13:54:10 +0000 (14:54 +0100)
committerRhys Perry <pendingchaos02@gmail.com>
Tue, 30 Oct 2018 20:27:12 +0000 (20:27 +0000)
TGSI has no I64MAD/U64MAD opcode.

Fixes: 278580729a5 ('st/glsl_to_tgsi: add support for 64-bit integers')
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index ef3c370d4bcbfda9cf2eb0841fad7e3ea5b96cd0..5322903b93a277312579e4df40ff7eb9a82491ae 100644 (file)
@@ -1274,6 +1274,10 @@ glsl_to_tgsi_visitor::try_emit_mad(ir_expression *ir, int mul_operand)
    st_src_reg a, b, c;
    st_dst_reg result_dst;
 
+   // there is no TGSI opcode for this
+   if (ir->type->is_integer_64())
+      return false;
+
    ir_expression *expr = ir->operands[mul_operand]->as_expression();
    if (!expr || expr->operation != ir_binop_mul)
       return false;