Add getGpuTimeStampInNS helper

Change-Id: I9170c773d1424ad69523d9a5c3b733299774c194
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2020-04-21 12:51:00 +02:00
parent 2c93f0dc99
commit d7f137ef47
3 changed files with 12 additions and 2 deletions

View File

@@ -85,6 +85,7 @@ class HwHelper {
virtual bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) const = 0;
virtual bool isFusedEuDispatchEnabled(const HardwareInfo &hwInfo) const = 0;
virtual bool isIndependentForwardProgressSupported() = 0;
virtual uint64_t getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const = 0;
static uint32_t getSubDevicesCount(const HardwareInfo *pHwInfo);
static uint32_t getEnginesCount(const HardwareInfo &hwInfo);
@@ -220,6 +221,8 @@ class HwHelperHw : public HwHelper {
bool isIndependentForwardProgressSupported() override;
uint64_t getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const override;
protected:
static const AuxTranslationMode defaultAuxTranslationMode;
HwHelperHw() = default;

View File

@@ -70,6 +70,10 @@ template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::isIndependentForwardProgressSupported() {
return true;
}
template <typename GfxFamily>
uint64_t HwHelperHw<GfxFamily>::getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const {
return static_cast<uint64_t>(timeStamp * frequency);
}
template <typename GfxFamily>
void MemorySynchronizationCommands<GfxFamily>::addPipeControlWA(LinearStream &commandStream, uint64_t gpuAddress, const HardwareInfo &hwInfo) {