mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 12:11:31 +08:00
Add member for handling additional adapterInfo fields
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9743e37fde
commit
aafbbf54db
@@ -15,6 +15,7 @@ set(NEO_CORE_OS_INTERFACE_WINDOWS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/debug_registry_reader.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/debug_registry_reader.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_command_stream.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}driver_info_windows_impl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/driver_info_windows.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/driver_info_windows.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/environment_variables.h
|
||||
@@ -83,6 +84,7 @@ set(NEO_CORE_OS_INTERFACE_WDDM
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wddm/adapter_factory.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wddm/adapter_factory_dxcore.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wddm/adapter_factory_dxcore.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wddm${BRANCH_DIR_SUFFIX}wddm_additional_adapter_info_options.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wddm/configure_device_address_space_${DRIVER_MODEL}.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wddm/set_gmm_input_args_${DRIVER_MODEL}.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wddm/max_mem_alloc_size_${DRIVER_MODEL}.cpp
|
||||
|
||||
@@ -33,18 +33,6 @@ std::string getCurrentLibraryPath() {
|
||||
}
|
||||
|
||||
namespace NEO {
|
||||
|
||||
DriverInfo *DriverInfo::create(const HardwareInfo *hwInfo, const OSInterface *osInterface) {
|
||||
if (osInterface == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto wddm = osInterface->getDriverModel()->as<Wddm>();
|
||||
UNRECOVERABLE_IF(wddm == nullptr);
|
||||
|
||||
return new DriverInfoWindows(wddm->getDeviceRegistryPath(), wddm->getPciBusInfo());
|
||||
};
|
||||
|
||||
DriverInfoWindows::DriverInfoWindows(const std::string &fullPath, const PhysicalDevicePciBusInfo &pciBusInfo)
|
||||
: path(DriverInfoWindows::trimRegistryKey(fullPath)), registryReader(createRegistryReaderFunc(path)) {
|
||||
this->pciBusInfo = pciBusInfo;
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/windows/driver_info_windows.h"
|
||||
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
DriverInfo *DriverInfo::create(const HardwareInfo *hwInfo, const OSInterface *osInterface) {
|
||||
if (osInterface == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto wddm = osInterface->getDriverModel()->as<Wddm>();
|
||||
UNRECOVERABLE_IF(wddm == nullptr);
|
||||
|
||||
return new DriverInfoWindows(wddm->getDeviceRegistryPath(), wddm->getPciBusInfo());
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
@@ -188,6 +188,8 @@ bool Wddm::queryAdapterInfo() {
|
||||
maxRenderFrequency = adapterInfo.MaxRenderFreq;
|
||||
timestampFrequency = adapterInfo.GfxTimeStampFreq;
|
||||
instrumentationEnabled = adapterInfo.Caps.InstrumentationIsEnabled != 0;
|
||||
|
||||
populateAdditionalAdapterInfoOptions(adapterInfo);
|
||||
}
|
||||
|
||||
return status == STATUS_SUCCESS;
|
||||
|
||||
@@ -207,6 +207,10 @@ class Wddm : public DriverModel {
|
||||
|
||||
PhyicalDevicePciSpeedInfo getPciSpeedInfo() const override;
|
||||
|
||||
uint32_t getAdditionalAdapterInfoOptions() {
|
||||
return additionalAdapterInfoOptions;
|
||||
}
|
||||
|
||||
protected:
|
||||
Wddm(std::unique_ptr<HwDeviceIdWddm> &&hwDeviceId, RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
MOCKABLE_VIRTUAL bool waitOnGPU(D3DKMT_HANDLE context);
|
||||
@@ -224,6 +228,7 @@ class Wddm : public DriverModel {
|
||||
return evictNeeded;
|
||||
}
|
||||
void setPlatformSupportEvictWhenNecessaryFlag(const HwInfoConfig &hwInfoConfig);
|
||||
void populateAdditionalAdapterInfoOptions(const ADAPTER_INFO_KMD &adapterInfo);
|
||||
|
||||
GMM_GFX_PARTITIONING gfxPartition{};
|
||||
ADAPTER_BDF adapterBDF{};
|
||||
@@ -265,6 +270,7 @@ class Wddm : public DriverModel {
|
||||
|
||||
uint32_t maxRenderFrequency = 0;
|
||||
uint32_t timestampFrequency = 0u;
|
||||
uint32_t additionalAdapterInfoOptions = 0u;
|
||||
|
||||
unsigned int enablePreemptionRegValue = 1;
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
void Wddm::populateAdditionalAdapterInfoOptions(const ADAPTER_INFO_KMD &adapterInfo) {
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user