gallivm: handle helper invocation (v2)
authorDave Airlie <airlied@redhat.com>
Thu, 4 Jul 2019 01:33:22 +0000 (11:33 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 27 Aug 2019 02:29:28 +0000 (12:29 +1000)
Just invert the exec_mask to get if this is a helper or not.

v2: get the bld mask (Roland)

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c

index 7c747f38e7ab741e14820074179742a1296a2d27..c51ab658f50511c8f35a3504ba7054511bc32225 100644 (file)
@@ -1724,6 +1724,11 @@ emit_fetch_system_value(
       atype = TGSI_TYPE_UNSIGNED;
       break;
 
+   case TGSI_SEMANTIC_HELPER_INVOCATION:
+      res = LLVMBuildNot(gallivm->builder, lp_build_mask_value(bld->mask), "");
+      atype = TGSI_TYPE_UNSIGNED;
+      break;
+
    default:
       assert(!"unexpected semantic in emit_fetch_system_value");
       res = bld_base->base.zero;