Add wddm interface to get dedicated video memory size
Related-To: NEO-2687 Change-Id: I44b9cfad250c61d5fadcbdd09f68e2751b43a415 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
parent
4198e8f24f
commit
2e3f77a3e9
|
@ -144,6 +144,7 @@ bool Wddm::queryAdapterInfo() {
|
|||
deviceRegistryPath = adapterInfo.DeviceRegistryPath;
|
||||
|
||||
systemSharedMemory = adapterInfo.SystemSharedMemory;
|
||||
dedicatedVideoMemory = adapterInfo.DedicatedVideoMemory;
|
||||
maxRenderFrequency = adapterInfo.MaxRenderFreq;
|
||||
instrumentationEnabled = adapterInfo.Caps.InstrumentationIsEnabled != 0;
|
||||
}
|
||||
|
@ -812,6 +813,10 @@ uint64_t Wddm::getSystemSharedMemory() const {
|
|||
return systemSharedMemory;
|
||||
}
|
||||
|
||||
uint64_t Wddm::getDedicatedVideoMemory() const {
|
||||
return dedicatedVideoMemory;
|
||||
}
|
||||
|
||||
uint64_t Wddm::getMaxApplicationAddress() const {
|
||||
return maximumApplicationAddress;
|
||||
}
|
||||
|
|
|
@ -103,6 +103,7 @@ class Wddm {
|
|||
}
|
||||
|
||||
uint64_t getSystemSharedMemory() const;
|
||||
uint64_t getDedicatedVideoMemory() const;
|
||||
|
||||
uint64_t getMaxApplicationAddress() const;
|
||||
|
||||
|
@ -161,6 +162,7 @@ class Wddm {
|
|||
std::unique_ptr<WorkaroundTable> workaroundTable;
|
||||
GMM_GFX_PARTITIONING gfxPartition;
|
||||
uint64_t systemSharedMemory = 0;
|
||||
uint64_t dedicatedVideoMemory = 0;
|
||||
uint32_t maxRenderFrequency = 0;
|
||||
bool instrumentationEnabled = false;
|
||||
std::string deviceRegistryPath;
|
||||
|
|
|
@ -25,6 +25,7 @@ class WddmMock : public Wddm {
|
|||
public:
|
||||
using Wddm::adapter;
|
||||
using Wddm::currentPagingFenceValue;
|
||||
using Wddm::dedicatedVideoMemory;
|
||||
using Wddm::device;
|
||||
using Wddm::featureTable;
|
||||
using Wddm::gdi;
|
||||
|
|
|
@ -63,6 +63,10 @@ struct Wddm23Tests : public Wddm23TestsWithoutWddmInit {
|
|||
}
|
||||
};
|
||||
|
||||
TEST_F(Wddm23Tests, whenGetDedicatedVideoMemoryIsCalledThenCorrectValueIsReturned) {
|
||||
EXPECT_EQ(wddm->dedicatedVideoMemory, wddm->getDedicatedVideoMemory());
|
||||
}
|
||||
|
||||
TEST_F(Wddm23Tests, whenCreateContextIsCalledThenEnableHwQueues) {
|
||||
EXPECT_TRUE(wddm->wddmInterface->hwQueuesSupported());
|
||||
EXPECT_EQ(1u, getCreateContextDataFcn()->Flags.HwQueueSupported);
|
||||
|
|
Loading…
Reference in New Issue