mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
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:
committed by
sys_ocldev
parent
73697b7ab4
commit
2b0db66c52
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user