Passing drm file descriptor to Metrics Library

Change-Id: I16b566ba262e0eeff9cb62b2a6ecc48811cdee48
Signed-off-by: Robert Krzemien <robert.krzemien@intel.com>
This commit is contained in:
Robert Krzemien
2020-05-15 17:28:26 +02:00
committed by sys_ocldev
parent 5eed521fe1
commit 9b3dd97f81
13 changed files with 124 additions and 28 deletions

View File

@ -1 +1 @@
608dcb5b626317e1e7550eedc84ff6e542a3b31b
e2d02d00770720096d3c97aaeae5eefbe3642d88

View File

@ -101,6 +101,7 @@ enum class ObjectType : uint32_t
// Query objects:
QueryHwCounters = 20000,
QueryPipelineTimestamps = 20001,
QueryHwCountersCopyReports = 20002,
// Configuration objects:
ConfigurationHwCountersOa = 30000,
@ -240,6 +241,16 @@ enum class ParameterType : uint32_t
Last
};
//////////////////////////////////////////////////////////////////////////
/// @brief Linux adapter types.
//////////////////////////////////////////////////////////////////////////
enum class LinuxAdapterType : uint8_t
{
DrmFileDescriptor = 0,
// ...
Last
};
//////////////////////////////////////////////////////////////////////////
/// @brief Client type.
//////////////////////////////////////////////////////////////////////////
@ -306,14 +317,31 @@ struct CommandBufferQueryHwCounters_1_0
bool Begin;
};
//////////////////////////////////////////////////////////////////////////
/// @brief Copy query hw counter reports command buffer data.
//////////////////////////////////////////////////////////////////////////
struct CommandBufferQueryHwCountersCopyReports_1_0
{
QueryHandle_1_0 HandleSource;
QueryHandle_1_0 HandleTarget;
GpuMemory_1_0 AddressSource;
GpuMemory_1_0 AddressTarget;
uint32_t SlotSource;
uint32_t SlotTarget;
uint32_t SlotCount;
};
//////////////////////////////////////////////////////////////////////////
/// @brief Query pipeline timestamps command buffer data.
//////////////////////////////////////////////////////////////////////////
struct CommandBufferQueryPipelineTimestamps_1_0
{
QueryHandle_1_0 Handle;
uint64_t EndTag;
bool Begin;
QueryHandle_1_0 Handle;
uint64_t EndTag;
bool Begin;
};
//////////////////////////////////////////////////////////////////////////
@ -356,11 +384,12 @@ struct CommandBufferData_1_0
union
{
CommandBufferQueryHwCounters_1_0 QueryHwCounters;
CommandBufferQueryPipelineTimestamps_1_0 QueryPipelineTimestamps;
CommandBufferOverride_1_0 Override;
CommandBufferMarkerStreamUser_1_0 MarkerStreamUser;
CommandBufferMarkerStreamUserExtended_1_0 MarkerStreamUserExtended;
CommandBufferQueryHwCounters_1_0 QueryHwCounters;
CommandBufferQueryHwCountersCopyReports_1_0 QueryHwCountersCopyReports;
CommandBufferQueryPipelineTimestamps_1_0 QueryPipelineTimestamps;
CommandBufferOverride_1_0 Override;
CommandBufferMarkerStreamUser_1_0 MarkerStreamUser;
CommandBufferMarkerStreamUserExtended_1_0 MarkerStreamUserExtended;
};
};
@ -442,8 +471,8 @@ struct GetReportData_1_0
union
{
GetReportQuery_1_0 Query;
GetReportOverride_1_0 Override;
GetReportQuery_1_0 Query;
GetReportOverride_1_0 Override;
};
};
@ -549,6 +578,19 @@ struct ClientCallbacks_1_0
CpuMemoryReleaseCallback_1_0 CpuMemoryRelease;
};
//////////////////////////////////////////////////////////////////////////
/// @brief Linux client adapter data.
//////////////////////////////////////////////////////////////////////////
struct ClientDataLinuxAdapter_1_0
{
LinuxAdapterType Type;
union
{
int32_t DrmFileDescriptor;
};
};
//////////////////////////////////////////////////////////////////////////
/// @brief Windows client data.
//////////////////////////////////////////////////////////////////////////
@ -565,7 +607,11 @@ struct ClientDataWindows_1_0
//////////////////////////////////////////////////////////////////////////
struct ClientDataLinux_1_0
{
void* Reserved;
union
{
ClientDataLinuxAdapter_1_0* Adapter;
void* Reserved;
};
};
//////////////////////////////////////////////////////////////////////////
@ -648,6 +694,6 @@ using ContextDeleteFunction_1_0 = StatusCode ( ML_STDCALL* ) ( const ContextHand
//////////////////////////////////////////////////////////////////////////
#define METRICS_LIBRARY_MAJOR_NUMBER 1
#define METRICS_LIBRARY_MINOR_NUMBER 0
#define METRICS_LIBRARY_BUILD_NUMBER 1
#define METRICS_LIBRARY_BUILD_NUMBER 3
} // namespace MetricsLibraryApi