intel/blorp: Allow BLORP calls to be predicated
authorNanley Chery <nanley.g.chery@intel.com>
Tue, 25 Apr 2017 20:32:34 +0000 (13:32 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sun, 23 Jul 2017 03:12:10 +0000 (20:12 -0700)
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/blorp/blorp.h
src/intel/blorp/blorp_genX_exec.h

index d5226c224814738f8390e9036a5fb155269434e5..1e96fb42b06a3334b52998185b0ee0a0b1a4261c 100644 (file)
@@ -75,6 +75,9 @@ enum blorp_batch_flags {
     * hardware.
     */
    BLORP_BATCH_NO_EMIT_DEPTH_STENCIL = (1 << 0),
+
+   /* This flag indicates that the blorp call should be predicated. */
+   BLORP_BATCH_PREDICATE_ENABLE      = (1 << 1),
 };
 
 struct blorp_batch {
index 91c0756bf3573c79026e418841e29cadf52552cb..93534169ef73088438453f30ef09ad79314e9b2c 100644 (file)
@@ -1543,6 +1543,9 @@ blorp_exec(struct blorp_batch *batch, const struct blorp_params *params)
    blorp_emit(batch, GENX(3DPRIMITIVE), prim) {
       prim.VertexAccessType = SEQUENTIAL;
       prim.PrimitiveTopologyType = _3DPRIM_RECTLIST;
+#if GEN_GEN >= 7
+      prim.PredicateEnable = batch->flags & BLORP_BATCH_PREDICATE_ENABLE;
+#endif
       prim.VertexCountPerInstance = 3;
       prim.InstanceCount = params->num_layers;
    }