feature: enable direct submission on Windows for WDDM 2.0

Related-To: NEO-4843

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
This commit is contained in:
Igor Venevtsev
2023-06-15 15:01:53 +00:00
committed by Compute-Runtime-Automation
parent 907f41529c
commit 386e7e5259
3 changed files with 25 additions and 0 deletions

View File

@@ -11,6 +11,7 @@
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/os_interface/debug_env_reader.h"
#include "shared/source/os_interface/os_interface.h"
#include "shared/source/os_interface/product_helper.h"
#include "shared/source/os_interface/windows/wddm/wddm.h"
#include "shared/source/os_interface/windows/wddm/wddm_interface.h"
@@ -90,6 +91,12 @@ uint64_t OsContextWin::getOfflineDumpContextId(uint32_t deviceIndex) const {
return 0;
}
bool OsContextWin::isDirectSubmissionSupported(const HardwareInfo &hwInfo) const {
auto &productHelper = wddm.getRootDeviceEnvironment().getHelper<ProductHelper>();
return wddm.getWddmVersion() == WddmVersion::WDDM_2_0 && productHelper.isDirectSubmissionSupported(hwInfo);
}
OsContextWin::~OsContextWin() {
if (contextInitialized && (false == this->wddm.skipResourceCleanup())) {
wddm.getWddmInterface()->destroyHwQueue(hardwareQueue.handle);