mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Performance Counters: gen12 support
Change-Id: I40ccf4958636fc9ffa9778c7abd9e1663c4bb7e4
This commit is contained in:
committed by
sys_ocldev
parent
13921f698e
commit
f2d0606301
@@ -152,6 +152,7 @@ QueryHandle_1_0 PerformanceCounters::getQueryHandle() {
|
||||
// PerformanceCounters::getGpuCommandsSize
|
||||
//////////////////////////////////////////////////////
|
||||
uint32_t PerformanceCounters::getGpuCommandsSize(
|
||||
const MetricsLibraryApi::GpuCommandBufferType commandBufferType,
|
||||
const bool begin) {
|
||||
CommandBufferData_1_0 bufferData = {};
|
||||
CommandBufferSize_1_0 bufferSize = {};
|
||||
@@ -165,8 +166,8 @@ uint32_t PerformanceCounters::getGpuCommandsSize(
|
||||
}
|
||||
|
||||
bufferData.HandleContext = context;
|
||||
bufferData.Type = GpuCommandBufferType::Render;
|
||||
bufferData.CommandsType = ObjectType::QueryHwCounters;
|
||||
bufferData.Type = commandBufferType;
|
||||
|
||||
bufferData.QueryHwCounters.Begin = begin;
|
||||
bufferData.QueryHwCounters.Handle = getQueryHandle();
|
||||
@@ -181,17 +182,19 @@ uint32_t PerformanceCounters::getGpuCommandsSize(
|
||||
// PerformanceCounters::getGpuCommands
|
||||
//////////////////////////////////////////////////////
|
||||
bool PerformanceCounters::getGpuCommands(
|
||||
const MetricsLibraryApi::GpuCommandBufferType commandBufferType,
|
||||
TagNode<HwPerfCounter> &performanceCounters,
|
||||
const bool begin,
|
||||
const uint32_t bufferSize,
|
||||
void *pBuffer) {
|
||||
|
||||
// Command Buffer data.
|
||||
CommandBufferData_1_0 bufferData = {};
|
||||
bufferData.HandleContext = context;
|
||||
bufferData.Type = GpuCommandBufferType::Render;
|
||||
bufferData.CommandsType = ObjectType::QueryHwCounters;
|
||||
bufferData.Data = pBuffer;
|
||||
bufferData.Size = bufferSize;
|
||||
bufferData.Type = commandBufferType;
|
||||
|
||||
// Gpu memory allocation for query hw counters.
|
||||
bufferData.Allocation.CpuAddress = reinterpret_cast<uint8_t *>(performanceCounters.tagForCpuAccess);
|
||||
|
||||
Reference in New Issue
Block a user