blorp: Implement blorp hooks to emit breakpoint
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24308>
This commit is contained in:
@@ -414,6 +414,18 @@ blorp_measure_end(struct blorp_batch *blorp_batch,
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
blorp_emit_breakpoint_pre_draw(struct blorp_batch *batch)
|
||||
{
|
||||
/* "Not implemented" */
|
||||
}
|
||||
|
||||
static void
|
||||
blorp_emit_breakpoint_post_draw(struct blorp_batch *batch)
|
||||
{
|
||||
/* "Not implemented" */
|
||||
}
|
||||
|
||||
void
|
||||
genX(crocus_init_blorp)(struct crocus_context *ice)
|
||||
{
|
||||
|
||||
@@ -489,3 +489,17 @@ genX(init_blorp)(struct iris_context *ice)
|
||||
ice->blorp.upload_shader = iris_blorp_upload_shader;
|
||||
ice->blorp.exec = iris_blorp_exec;
|
||||
}
|
||||
|
||||
static void
|
||||
blorp_emit_breakpoint_pre_draw(struct blorp_batch *blorp_batch)
|
||||
{
|
||||
struct iris_batch *batch = blorp_batch->driver_batch;
|
||||
genX(maybe_emit_breakpoint)(batch, true);
|
||||
}
|
||||
|
||||
static void
|
||||
blorp_emit_breakpoint_post_draw(struct blorp_batch *blorp_batch)
|
||||
{
|
||||
struct iris_batch *batch = blorp_batch->driver_batch;
|
||||
genX(maybe_emit_breakpoint)(batch, false);
|
||||
}
|
||||
|
||||
@@ -123,6 +123,11 @@ static void
|
||||
blorp_emit_pipeline(struct blorp_batch *batch,
|
||||
const struct blorp_params *params);
|
||||
|
||||
static void
|
||||
blorp_emit_breakpoint_pre_draw(struct blorp_batch *batch);
|
||||
static void
|
||||
blorp_emit_breakpoint_post_draw(struct blorp_batch *batch);
|
||||
|
||||
/***** BEGIN blorp_exec implementation ******/
|
||||
|
||||
static uint64_t
|
||||
@@ -2033,6 +2038,7 @@ blorp_exec_3d(struct blorp_batch *batch, const struct blorp_params *params)
|
||||
if (!(batch->flags & BLORP_BATCH_NO_EMIT_DEPTH_STENCIL))
|
||||
blorp_emit_depth_stencil_config(batch, params);
|
||||
|
||||
blorp_emit_breakpoint_pre_draw(batch);
|
||||
blorp_emit(batch, GENX(3DPRIMITIVE), prim) {
|
||||
prim.VertexAccessType = SEQUENTIAL;
|
||||
prim.PrimitiveTopologyType = _3DPRIM_RECTLIST;
|
||||
@@ -2042,7 +2048,7 @@ blorp_exec_3d(struct blorp_batch *batch, const struct blorp_params *params)
|
||||
prim.VertexCountPerInstance = 3;
|
||||
prim.InstanceCount = params->num_layers;
|
||||
}
|
||||
|
||||
blorp_emit_breakpoint_post_draw(batch);
|
||||
blorp_measure_end(batch, params);
|
||||
}
|
||||
|
||||
|
||||
@@ -396,3 +396,17 @@ genX(blorp_exec)(struct blorp_batch *batch,
|
||||
else
|
||||
blorp_exec_on_render(batch, params);
|
||||
}
|
||||
|
||||
static void
|
||||
blorp_emit_breakpoint_pre_draw(struct blorp_batch *batch)
|
||||
{
|
||||
struct anv_cmd_buffer *cmd_buffer = batch->driver_batch;
|
||||
genX(emit_breakpoint)(&cmd_buffer->batch, cmd_buffer->device, true);
|
||||
}
|
||||
|
||||
static void
|
||||
blorp_emit_breakpoint_post_draw(struct blorp_batch *batch)
|
||||
{
|
||||
struct anv_cmd_buffer *cmd_buffer = batch->driver_batch;
|
||||
genX(emit_breakpoint)(&cmd_buffer->batch, cmd_buffer->device, false);
|
||||
}
|
||||
|
||||
@@ -369,3 +369,15 @@ genX(blorp_exec)(struct blorp_batch *batch,
|
||||
else
|
||||
blorp_exec_on_render(batch, params);
|
||||
}
|
||||
|
||||
static void
|
||||
blorp_emit_breakpoint_pre_draw(struct blorp_batch *batch)
|
||||
{
|
||||
/* "Not implemented" */
|
||||
}
|
||||
|
||||
static void
|
||||
blorp_emit_breakpoint_post_draw(struct blorp_batch *batch)
|
||||
{
|
||||
/* "Not implemented" */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user