anv: Update pipeline statistics mask for task/mesh shader invocations

Since VkQueryPipelineStatisticFlagBits is extended by two bits for
task/mesh shader invocations, ANV_PIPELINE_STATISTICS_MASK should be
defined conditionally based on GFX_VER.

This commit modifies the mask and updates the vk_pipeline_stat_to_reg
array accordingly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29523>
This commit is contained in:
Kevin Chuang 2024-05-21 18:11:17 -07:00 committed by Marge Bot
parent d07321e3d8
commit b69f7f625b
2 changed files with 11 additions and 1 deletions

View file

@ -5898,7 +5898,6 @@ struct anv_sampler {
struct anv_state custom_border_color_db;
};
#define ANV_PIPELINE_STATISTICS_MASK 0x000007ff
struct anv_query_pool {
struct vk_query_pool vk;

View file

@ -47,6 +47,13 @@
#define __gen_get_batch_dwords anv_batch_emit_dwords
#define __gen_address_offset anv_address_add
#define __gen_get_batch_address(b, a) anv_batch_address(b, a)
#if GFX_VERx10 >= 125
#define ANV_PIPELINE_STATISTICS_MASK 0x00001fff
#else
#define ANV_PIPELINE_STATISTICS_MASK 0x000007ff
#endif
#include "common/mi_builder.h"
#include "perf/intel_perf.h"
#include "perf/intel_perf_mdapi.h"
@ -928,6 +935,10 @@ static const uint32_t vk_pipeline_stat_to_reg[] = {
GENX(HS_INVOCATION_COUNT_num),
GENX(DS_INVOCATION_COUNT_num),
GENX(CS_INVOCATION_COUNT_num),
#if GFX_VERx10 >= 125
GENX(TASK_INVOCATION_COUNT_num),
GENX(MESH_INVOCATION_COUNT_num)
#endif
};
static void