Add getter to query Wddm version

Related-To: NEO-3639

Change-Id: If066f954827982dcc388f3f0ea241dbc98e824ea
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2019-12-17 14:29:28 +01:00
committed by sys_ocldev
parent 73697b7ab4
commit 2b0db66c52
5 changed files with 28 additions and 3 deletions

View File

@@ -122,7 +122,7 @@ bool Wddm::init(HardwareInfo &outHardwareInfo) {
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(outHardwareInfo);
if (featureTable->ftrWddmHwQueues) {
if (WddmVersion::WDDM_2_3 == getWddmVersion()) {
wddmInterface = std::make_unique<WddmInterface23>(*this);
} else {
wddmInterface = std::make_unique<WddmInterface20>(*this);
@@ -981,4 +981,12 @@ void Wddm::updatePagingFenceValue(uint64_t newPagingFenceValue) {
interlockedMax(currentPagingFenceValue, newPagingFenceValue);
}
WddmVersion Wddm::getWddmVersion() {
if (featureTable->ftrWddmHwQueues) {
return WddmVersion::WDDM_2_3;
} else {
return WddmVersion::WDDM_2_0;
}
}
} // namespace NEO

View File

@@ -44,6 +44,11 @@ struct WddmSubmitArguments {
D3DKMT_HANDLE hwQueueHandle;
};
enum class WddmVersion : uint32_t {
WDDM_2_0 = 0,
WDDM_2_3
};
class Wddm {
public:
typedef HRESULT(WINAPI *CreateDXGIFactoryFcn)(REFIID riid, void **ppFactory);
@@ -152,6 +157,8 @@ class Wddm {
void setGmmInputArg(void *args);
WddmVersion getWddmVersion();
protected:
std::unique_ptr<Gdi> gdi;
D3DKMT_HANDLE adapter = 0;