mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 08:07:19 +08:00
Use newer GMM API
Related-To: NEO-3832 Change-Id: I9c97a20a6a611118eb14348a8c6960115a20777d Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com> Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
aa7058a2a9
commit
3fc748c0f9
@@ -27,4 +27,6 @@ uint32_t OSInterface::getDeviceHandle() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void OSInterface::setGmmInputArgs(void *args) {}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -25,6 +25,7 @@ class OSInterface {
|
||||
static bool osEnableLocalMemory;
|
||||
static bool are64kbPagesEnabled();
|
||||
unsigned int getDeviceHandle() const;
|
||||
void setGmmInputArgs(void *args);
|
||||
|
||||
protected:
|
||||
OSInterfaceImpl *osInterfaceImpl = nullptr;
|
||||
|
||||
@@ -27,6 +27,10 @@ uint32_t OSInterface::getDeviceHandle() const {
|
||||
return static_cast<uint32_t>(osInterfaceImpl->getDeviceHandle());
|
||||
}
|
||||
|
||||
void OSInterface::setGmmInputArgs(void *args) {
|
||||
this->get()->getWddm()->setGmmInputArg(args);
|
||||
}
|
||||
|
||||
OSInterface::OSInterfaceImpl::OSInterfaceImpl() = default;
|
||||
|
||||
D3DKMT_HANDLE OSInterface::OSInterfaceImpl::getAdapterHandle() const {
|
||||
|
||||
@@ -161,6 +161,7 @@ bool Wddm::queryAdapterInfo() {
|
||||
SkuInfoReceiver::receiveWaTableFromAdapterInfo(workaroundTable.get(), &adapterInfo);
|
||||
|
||||
memcpy_s(&gfxPartition, sizeof(gfxPartition), &adapterInfo.GfxPartition, sizeof(GMM_GFX_PARTITIONING));
|
||||
memcpy_s(&adapterBDF, sizeof(adapterBDF), &adapterInfo.stAdapterBDF, sizeof(ADAPTER_BDF));
|
||||
|
||||
deviceRegistryPath = adapterInfo.DeviceRegistryPath;
|
||||
|
||||
@@ -972,6 +973,10 @@ void Wddm::waitOnPagingFenceFromCpu() {
|
||||
;
|
||||
}
|
||||
|
||||
void Wddm::setGmmInputArg(void *args) {
|
||||
reinterpret_cast<GMM_INIT_IN_ARGS *>(args)->stAdapterBDF = this->adapterBDF;
|
||||
}
|
||||
|
||||
void Wddm::updatePagingFenceValue(uint64_t newPagingFenceValue) {
|
||||
interlockedMax(currentPagingFenceValue, newPagingFenceValue);
|
||||
}
|
||||
|
||||
@@ -144,6 +144,8 @@ class Wddm {
|
||||
}
|
||||
void waitOnPagingFenceFromCpu();
|
||||
|
||||
void setGmmInputArg(void *args);
|
||||
|
||||
protected:
|
||||
std::unique_ptr<Gdi> gdi;
|
||||
D3DKMT_HANDLE adapter = 0;
|
||||
@@ -160,6 +162,7 @@ class Wddm {
|
||||
std::unique_ptr<FeatureTable> featureTable;
|
||||
std::unique_ptr<WorkaroundTable> workaroundTable;
|
||||
GMM_GFX_PARTITIONING gfxPartition;
|
||||
ADAPTER_BDF adapterBDF;
|
||||
uint64_t systemSharedMemory = 0;
|
||||
uint64_t dedicatedVideoMemory = 0;
|
||||
uint32_t maxRenderFrequency = 0;
|
||||
|
||||
Reference in New Issue
Block a user