intel/blorp: add explicit clear op enums for stencil and linear paths

Add dedicated BLORP op enums so clear paths can be represented
precisely.

This is enum-only groundwork; behavior and trace output are wired in
follow-up commits.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40414>
This commit is contained in:
Michael Cheng 2026-03-12 13:18:45 -07:00 committed by Marge Bot
parent 7d117e44be
commit b901ff322a
6 changed files with 35 additions and 0 deletions

View file

@ -37,14 +37,19 @@ blorp_op_to_intel_measure_snapshot(enum blorp_op op)
MAP(CCS_COLOR_CLEAR),
MAP(CCS_PARTIAL_RESOLVE),
MAP(CCS_RESOLVE),
MAP(FAST_STENCIL_CLEAR),
MAP(HIZ_AMBIGUATE),
MAP(HIZ_CLEAR),
MAP(HIZ_STENCIL_CLEAR),
MAP(HIZ_RESOLVE),
MAP(HIZ_PARTIAL_RESOLVE),
MAP(MCS_AMBIGUATE),
MAP(MCS_COLOR_CLEAR),
MAP(MCS_PARTIAL_RESOLVE),
MAP(LINEAR_SURFACE_CLEAR),
MAP(SLOW_COLOR_CLEAR),
MAP(SLOW_STENCIL_CLEAR),
MAP(SLOW_DEPTH_STENCIL_CLEAR),
MAP(SLOW_DEPTH_CLEAR),
#undef MAP
};
@ -63,14 +68,19 @@ const char *blorp_op_to_name(enum blorp_op op)
MAP(CCS_COLOR_CLEAR),
MAP(CCS_PARTIAL_RESOLVE),
MAP(CCS_RESOLVE),
MAP(FAST_STENCIL_CLEAR),
MAP(HIZ_AMBIGUATE),
MAP(HIZ_CLEAR),
MAP(HIZ_STENCIL_CLEAR),
MAP(HIZ_RESOLVE),
MAP(HIZ_PARTIAL_RESOLVE),
MAP(MCS_AMBIGUATE),
MAP(MCS_COLOR_CLEAR),
MAP(MCS_PARTIAL_RESOLVE),
MAP(LINEAR_SURFACE_CLEAR),
MAP(SLOW_COLOR_CLEAR),
MAP(SLOW_STENCIL_CLEAR),
MAP(SLOW_DEPTH_STENCIL_CLEAR),
MAP(SLOW_DEPTH_CLEAR),
#undef MAP
};

View file

@ -45,14 +45,19 @@ enum blorp_op {
BLORP_OP_CCS_COLOR_CLEAR,
BLORP_OP_CCS_PARTIAL_RESOLVE,
BLORP_OP_CCS_RESOLVE,
BLORP_OP_FAST_STENCIL_CLEAR,
BLORP_OP_HIZ_AMBIGUATE,
BLORP_OP_HIZ_CLEAR,
BLORP_OP_HIZ_STENCIL_CLEAR,
BLORP_OP_HIZ_RESOLVE,
BLORP_OP_HIZ_PARTIAL_RESOLVE,
BLORP_OP_MCS_AMBIGUATE,
BLORP_OP_MCS_COLOR_CLEAR,
BLORP_OP_MCS_PARTIAL_RESOLVE,
BLORP_OP_LINEAR_SURFACE_CLEAR,
BLORP_OP_SLOW_COLOR_CLEAR,
BLORP_OP_SLOW_STENCIL_CLEAR,
BLORP_OP_SLOW_DEPTH_STENCIL_CLEAR,
BLORP_OP_SLOW_DEPTH_CLEAR,
};

View file

@ -561,13 +561,18 @@ blorp_op_type_is_clear(enum blorp_op op)
case BLORP_OP_CCS_COLOR_CLEAR:
case BLORP_OP_CCS_PARTIAL_RESOLVE:
case BLORP_OP_CCS_RESOLVE:
case BLORP_OP_FAST_STENCIL_CLEAR:
case BLORP_OP_HIZ_AMBIGUATE:
case BLORP_OP_HIZ_CLEAR:
case BLORP_OP_HIZ_RESOLVE:
case BLORP_OP_HIZ_STENCIL_CLEAR:
case BLORP_OP_MCS_AMBIGUATE:
case BLORP_OP_MCS_COLOR_CLEAR:
case BLORP_OP_MCS_PARTIAL_RESOLVE:
case BLORP_OP_LINEAR_SURFACE_CLEAR:
case BLORP_OP_SLOW_COLOR_CLEAR:
case BLORP_OP_SLOW_STENCIL_CLEAR:
case BLORP_OP_SLOW_DEPTH_STENCIL_CLEAR:
case BLORP_OP_SLOW_DEPTH_CLEAR:
return true;
default:

View file

@ -240,15 +240,20 @@ intel_measure_snapshot_string(enum intel_measure_snapshot_type type)
[INTEL_SNAPSHOT_COMPUTE] = "compute",
[INTEL_SNAPSHOT_COPY] = "copy",
[INTEL_SNAPSHOT_DRAW] = "draw",
[INTEL_SNAPSHOT_FAST_STENCIL_CLEAR] = "fast stencil clear",
[INTEL_SNAPSHOT_HIZ_AMBIGUATE] = "hiz ambiguate",
[INTEL_SNAPSHOT_HIZ_CLEAR] = "hiz clear",
[INTEL_SNAPSHOT_HIZ_RESOLVE] = "hiz resolve",
[INTEL_SNAPSHOT_HIZ_PARTIAL_RESOLVE] = "hiz partial resolve",
[INTEL_SNAPSHOT_HIZ_STENCIL_CLEAR] = "hiz + stencil clear",
[INTEL_SNAPSHOT_LINEAR_SURFACE_CLEAR]= "linear surface clear",
[INTEL_SNAPSHOT_MCS_AMBIGUATE] = "mcs ambiguate",
[INTEL_SNAPSHOT_MCS_COLOR_CLEAR] = "mcs color clear",
[INTEL_SNAPSHOT_MCS_PARTIAL_RESOLVE] = "mcs partial resolve",
[INTEL_SNAPSHOT_SLOW_COLOR_CLEAR] = "slow color clear",
[INTEL_SNAPSHOT_SLOW_DEPTH_CLEAR] = "slow depth clear",
[INTEL_SNAPSHOT_SLOW_DEPTH_STENCIL_CLEAR] = "slow depth/stencil clear",
[INTEL_SNAPSHOT_SLOW_STENCIL_CLEAR] = "slow stencil clear",
[INTEL_SNAPSHOT_SECONDARY_BATCH] = "secondary command buffer",
[INTEL_SNAPSHOT_END] = "end",
};

View file

@ -41,14 +41,19 @@ enum intel_measure_snapshot_type {
INTEL_SNAPSHOT_COMPUTE,
INTEL_SNAPSHOT_COPY,
INTEL_SNAPSHOT_DRAW,
INTEL_SNAPSHOT_FAST_STENCIL_CLEAR,
INTEL_SNAPSHOT_HIZ_AMBIGUATE,
INTEL_SNAPSHOT_HIZ_CLEAR,
INTEL_SNAPSHOT_HIZ_RESOLVE,
INTEL_SNAPSHOT_HIZ_PARTIAL_RESOLVE,
INTEL_SNAPSHOT_HIZ_STENCIL_CLEAR,
INTEL_SNAPSHOT_MCS_AMBIGUATE,
INTEL_SNAPSHOT_MCS_COLOR_CLEAR,
INTEL_SNAPSHOT_MCS_PARTIAL_RESOLVE,
INTEL_SNAPSHOT_SLOW_COLOR_CLEAR,
INTEL_SNAPSHOT_LINEAR_SURFACE_CLEAR,
INTEL_SNAPSHOT_SLOW_STENCIL_CLEAR,
INTEL_SNAPSHOT_SLOW_DEPTH_STENCIL_CLEAR,
INTEL_SNAPSHOT_SLOW_DEPTH_CLEAR,
INTEL_SNAPSHOT_SECONDARY_BATCH,
INTEL_SNAPSHOT_END,

View file

@ -515,13 +515,18 @@ get_color_aux_op(const struct blorp_params *params)
*/
case BLORP_OP_HIZ_AMBIGUATE:
case BLORP_OP_HIZ_CLEAR:
case BLORP_OP_HIZ_STENCIL_CLEAR:
case BLORP_OP_HIZ_RESOLVE:
case BLORP_OP_HIZ_PARTIAL_RESOLVE:
case BLORP_OP_FAST_STENCIL_CLEAR:
case BLORP_OP_SLOW_STENCIL_CLEAR:
case BLORP_OP_SLOW_DEPTH_STENCIL_CLEAR:
case BLORP_OP_SLOW_DEPTH_CLEAR:
assert(params->fast_clear_op == ISL_AUX_OP_NONE);
return ISL_AUX_OP_NONE;
/* The remaining operations are considered regular draws. */
case BLORP_OP_LINEAR_SURFACE_CLEAR:
case BLORP_OP_SLOW_COLOR_CLEAR:
case BLORP_OP_BLIT:
case BLORP_OP_COPY: