From: Nanley Chery Date: Tue, 25 Apr 2017 20:32:34 +0000 (-0700) Subject: intel/blorp: Allow BLORP calls to be predicated X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8e2729fbb8686cba2a54086e5088a5ca4c41b39d;p=mesa.git intel/blorp: Allow BLORP calls to be predicated Signed-off-by: Nanley Chery Reviewed-by: Jason Ekstrand --- diff --git a/src/intel/blorp/blorp.h b/src/intel/blorp/blorp.h index d5226c22481..1e96fb42b06 100644 --- a/src/intel/blorp/blorp.h +++ b/src/intel/blorp/blorp.h @@ -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 { diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h index 91c0756bf35..93534169ef7 100644 --- a/src/intel/blorp/blorp_genX_exec.h +++ b/src/intel/blorp/blorp_genX_exec.h @@ -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; }