2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2019-02-12 17:56:27 +08:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2019-07-12 22:50:14 +08:00
|
|
|
#include "core/command_stream/preemption_mode.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
#include "runtime/helpers/kmd_notify_properties.h"
|
|
|
|
|
2018-10-28 05:46:29 +08:00
|
|
|
#include "engine_node.h"
|
2017-12-21 07:45:38 +08:00
|
|
|
#include "gtsysinfo.h"
|
2018-07-18 20:11:05 +08:00
|
|
|
#include "igfxfmid.h"
|
2018-01-09 21:08:34 +08:00
|
|
|
#include "sku_info.h"
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2018-02-19 16:50:17 +08:00
|
|
|
#include <cstddef>
|
2018-10-04 18:44:49 +08:00
|
|
|
#include <string>
|
2017-11-14 18:15:09 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
struct RuntimeCapabilityTable {
|
2018-12-06 22:33:02 +08:00
|
|
|
KmdNotifyProperties kmdNotifyProperties;
|
|
|
|
uint64_t gpuAddressSpace;
|
2017-12-21 07:45:38 +08:00
|
|
|
double defaultProfilingTimerResolution;
|
2018-12-06 22:33:02 +08:00
|
|
|
size_t requiredPreemptionSurfaceSize;
|
|
|
|
bool (*isSimulation)(unsigned short);
|
|
|
|
PreemptionMode defaultPreemptionMode;
|
2019-03-27 17:06:29 +08:00
|
|
|
aub_stream::EngineType defaultEngineType;
|
2018-12-06 22:33:02 +08:00
|
|
|
uint32_t maxRenderFrequency;
|
2017-12-21 07:45:38 +08:00
|
|
|
unsigned int clVersionSupport;
|
2018-12-06 22:33:02 +08:00
|
|
|
uint32_t aubDeviceId;
|
|
|
|
uint32_t extraQuantityThreadsPerEU;
|
|
|
|
uint32_t slmSize;
|
2019-04-16 15:06:37 +08:00
|
|
|
bool blitterOperationsSupported;
|
2019-08-20 21:17:10 +08:00
|
|
|
bool ftrSupportsInteger64BitAtomics;
|
2017-12-21 07:45:38 +08:00
|
|
|
bool ftrSupportsFP64;
|
|
|
|
bool ftrSupports64BitMath;
|
|
|
|
bool ftrSvm;
|
|
|
|
bool ftrSupportsCoherency;
|
|
|
|
bool ftrSupportsVmeAvcTextureSampler;
|
|
|
|
bool ftrSupportsVmeAvcPreemption;
|
2018-07-18 20:11:05 +08:00
|
|
|
bool ftrRenderCompressedBuffers;
|
|
|
|
bool ftrRenderCompressedImages;
|
2018-12-06 22:33:02 +08:00
|
|
|
bool ftr64KBpages;
|
2017-12-21 07:45:38 +08:00
|
|
|
bool instrumentationEnabled;
|
|
|
|
bool forceStatelessCompilationFor32Bit;
|
2019-07-24 17:43:29 +08:00
|
|
|
const char *platformType;
|
2018-05-22 19:22:56 +08:00
|
|
|
bool sourceLevelDebuggerSupported;
|
2018-10-24 21:59:36 +08:00
|
|
|
bool supportsVme;
|
2018-12-06 22:33:02 +08:00
|
|
|
bool supportCacheFlushAfterWalker;
|
2019-07-01 17:29:15 +08:00
|
|
|
bool supportsImages;
|
2019-07-15 21:08:42 +08:00
|
|
|
bool supportsDeviceEnqueue;
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
|
|
|
|
2018-02-19 16:50:17 +08:00
|
|
|
struct HardwareCapabilities {
|
|
|
|
size_t image3DMaxWidth;
|
|
|
|
size_t image3DMaxHeight;
|
2018-06-08 22:42:29 +08:00
|
|
|
uint64_t maxMemAllocSize;
|
2018-07-10 19:22:11 +08:00
|
|
|
bool isStatelesToStatefullWithOffsetSupported;
|
2018-02-19 16:50:17 +08:00
|
|
|
};
|
|
|
|
|
2017-12-21 07:45:38 +08:00
|
|
|
struct HardwareInfo {
|
2018-06-12 15:42:47 +08:00
|
|
|
HardwareInfo() = default;
|
2019-05-08 22:00:24 +08:00
|
|
|
HardwareInfo(const PLATFORM *platform, const FeatureTable *featureTable, const WorkaroundTable *workaroundTable,
|
|
|
|
const GT_SYSTEM_INFO *gtSystemInfo, const RuntimeCapabilityTable &capabilityTable);
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2019-05-08 22:00:24 +08:00
|
|
|
PLATFORM platform = {};
|
|
|
|
FeatureTable featureTable = {};
|
|
|
|
WorkaroundTable workaroundTable = {};
|
2019-07-08 22:15:59 +08:00
|
|
|
alignas(4) GT_SYSTEM_INFO gtSystemInfo = {};
|
2018-06-12 15:42:47 +08:00
|
|
|
|
|
|
|
RuntimeCapabilityTable capabilityTable = {};
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY product>
|
|
|
|
struct HwMapper {};
|
|
|
|
|
|
|
|
template <GFXCORE_FAMILY gfxFamily>
|
|
|
|
struct GfxFamilyMapper {};
|
|
|
|
|
|
|
|
// Global table of hardware prefixes
|
|
|
|
extern bool familyEnabled[IGFX_MAX_CORE];
|
|
|
|
extern const char *familyName[IGFX_MAX_CORE];
|
|
|
|
extern const char *hardwarePrefix[];
|
|
|
|
extern const HardwareInfo *hardwareInfoTable[IGFX_MAX_PRODUCT];
|
2019-03-28 22:34:26 +08:00
|
|
|
extern void (*hardwareInfoSetup[IGFX_MAX_PRODUCT])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const std::string &hwInfoConfig);
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
template <GFXCORE_FAMILY gfxFamily>
|
|
|
|
struct EnableGfxFamilyHw {
|
|
|
|
EnableGfxFamilyHw() {
|
|
|
|
familyEnabled[gfxFamily] = true;
|
|
|
|
familyName[gfxFamily] = GfxFamilyMapper<gfxFamily>::name;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-07-18 17:58:30 +08:00
|
|
|
bool getHwInfoForPlatformString(std::string &platform, const HardwareInfo *&hwInfoIn);
|
2019-03-27 17:06:29 +08:00
|
|
|
aub_stream::EngineType getChosenEngineType(const HardwareInfo &hwInfo);
|
2019-08-26 21:36:24 +08:00
|
|
|
const std::string getFamilyNameWithType(const HardwareInfo &hwInfo);
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|