intel/blorp: add measure_end entry point

Will be useful to figure out when blorp operations end.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Acked-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13996>
This commit is contained in:
Lionel Landwerlin
2021-11-26 18:22:40 +02:00
committed by Marge Bot
parent d3724de894
commit bb541d1159
4 changed files with 34 additions and 4 deletions

View File

@@ -401,6 +401,12 @@ blorp_measure_start(struct blorp_batch *blorp_batch,
{ {
} }
static void
blorp_measure_end(struct blorp_batch *blorp_batch,
const struct blorp_params *params)
{
}
void void
genX(crocus_init_blorp)(struct crocus_context *ice) genX(crocus_init_blorp)(struct crocus_context *ice)
{ {

View File

@@ -409,6 +409,13 @@ blorp_measure_start(struct blorp_batch *blorp_batch,
iris_measure_snapshot(ice, batch, params->snapshot_type, NULL, NULL, NULL); iris_measure_snapshot(ice, batch, params->snapshot_type, NULL, NULL, NULL);
} }
static void
blorp_measure_end(struct blorp_batch *blorp_batch,
const struct blorp_params *params)
{
}
void void
genX(init_blorp)(struct iris_context *ice) genX(init_blorp)(struct iris_context *ice)
{ {

View File

@@ -56,6 +56,10 @@ static void
blorp_measure_start(struct blorp_batch *batch, blorp_measure_start(struct blorp_batch *batch,
const struct blorp_params *params); const struct blorp_params *params);
static void
blorp_measure_end(struct blorp_batch *batch,
const struct blorp_params *params);
static void * static void *
blorp_alloc_dynamic_state(struct blorp_batch *batch, blorp_alloc_dynamic_state(struct blorp_batch *batch,
uint32_t size, uint32_t size,
@@ -1785,6 +1789,8 @@ blorp_emit_gfx8_hiz_op(struct blorp_batch *batch,
*/ */
assert(params->depth.enabled || params->stencil.enabled); assert(params->depth.enabled || params->stencil.enabled);
blorp_measure_start(batch, params);
/* The stencil buffer should only be enabled if a fast clear operation is /* The stencil buffer should only be enabled if a fast clear operation is
* requested. * requested.
*/ */
@@ -1835,8 +1841,6 @@ blorp_emit_gfx8_hiz_op(struct blorp_batch *batch,
blorp_emit_depth_stencil_config(batch, params); blorp_emit_depth_stencil_config(batch, params);
} }
blorp_measure_start(batch, params);
blorp_emit(batch, GENX(3DSTATE_WM_HZ_OP), hzp) { blorp_emit(batch, GENX(3DSTATE_WM_HZ_OP), hzp) {
switch (params->hiz_op) { switch (params->hiz_op) {
case ISL_AUX_OP_FAST_CLEAR: case ISL_AUX_OP_FAST_CLEAR:
@@ -1882,6 +1886,8 @@ blorp_emit_gfx8_hiz_op(struct blorp_batch *batch,
} }
blorp_emit(batch, GENX(3DSTATE_WM_HZ_OP), hzp); blorp_emit(batch, GENX(3DSTATE_WM_HZ_OP), hzp);
blorp_measure_end(batch, params);
} }
#endif #endif
@@ -2022,6 +2028,8 @@ blorp_exec_3d(struct blorp_batch *batch, const struct blorp_params *params)
} }
#endif #endif
blorp_measure_start(batch, params);
blorp_emit_vertex_buffers(batch, params); blorp_emit_vertex_buffers(batch, params);
blorp_emit_vertex_elements(batch, params); blorp_emit_vertex_elements(batch, params);
@@ -2032,8 +2040,6 @@ blorp_exec_3d(struct blorp_batch *batch, const struct blorp_params *params)
if (!(batch->flags & BLORP_BATCH_NO_EMIT_DEPTH_STENCIL)) if (!(batch->flags & BLORP_BATCH_NO_EMIT_DEPTH_STENCIL))
blorp_emit_depth_stencil_config(batch, params); blorp_emit_depth_stencil_config(batch, params);
blorp_measure_start(batch, params);
blorp_emit(batch, GENX(3DPRIMITIVE), prim) { blorp_emit(batch, GENX(3DPRIMITIVE), prim) {
prim.VertexAccessType = SEQUENTIAL; prim.VertexAccessType = SEQUENTIAL;
prim.PrimitiveTopologyType = _3DPRIM_RECTLIST; prim.PrimitiveTopologyType = _3DPRIM_RECTLIST;
@@ -2043,6 +2049,8 @@ blorp_exec_3d(struct blorp_batch *batch, const struct blorp_params *params)
prim.VertexCountPerInstance = 3; prim.VertexCountPerInstance = 3;
prim.InstanceCount = params->num_layers; prim.InstanceCount = params->num_layers;
} }
blorp_measure_end(batch, params);
} }
#if GFX_VER >= 7 #if GFX_VER >= 7
@@ -2111,6 +2119,8 @@ blorp_exec_compute(struct blorp_batch *batch, const struct blorp_params *params)
assert(!(batch->flags & BLORP_BATCH_PREDICATE_ENABLE)); assert(!(batch->flags & BLORP_BATCH_PREDICATE_ENABLE));
assert(params->hiz_op == ISL_AUX_OP_NONE); assert(params->hiz_op == ISL_AUX_OP_NONE);
blorp_measure_start(batch, params);
#if GFX_VER >= 7 #if GFX_VER >= 7
const struct brw_cs_prog_data *cs_prog_data = params->cs_prog_data; const struct brw_cs_prog_data *cs_prog_data = params->cs_prog_data;
@@ -2284,6 +2294,8 @@ blorp_exec_compute(struct blorp_batch *batch, const struct blorp_params *params)
unreachable("Compute blorp is not supported on SNB and earlier"); unreachable("Compute blorp is not supported on SNB and earlier");
#endif /* GFX_VER >= 7 */ #endif /* GFX_VER >= 7 */
blorp_measure_end(batch, params);
} }

View File

@@ -43,6 +43,11 @@ static void blorp_measure_start(struct blorp_batch *_batch,
NULL, 0); NULL, 0);
} }
static void blorp_measure_end(struct blorp_batch *_batch,
const struct blorp_params *params)
{
}
static void * static void *
blorp_emit_dwords(struct blorp_batch *batch, unsigned n) blorp_emit_dwords(struct blorp_batch *batch, unsigned n)
{ {