mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Set HwInfo to GmmHelper on Device creation
This allows querying HwInfo from code that doesnt have access to Device Change-Id: I0084f824f557cd85c2fdfbf0ff2ec71118e9af2e
This commit is contained in:
committed by
sys_ocldev
parent
5186474ef5
commit
5408913d38
@@ -620,6 +620,13 @@ TEST(GmmTest, whenContextIsDestroyedMultimpleTimesThenDontCrash) {
|
||||
EXPECT_TRUE(GmmHelper::initContext(hwinfo->pPlatform, hwinfo->pSkuTable, hwinfo->pWaTable, hwinfo->pSysInfo));
|
||||
}
|
||||
|
||||
TEST(GmmTest, givenHwInfoWhenDeviceIsCreatedTheSetThisHwInfoToGmmHelper) {
|
||||
HardwareInfo localHwInfo = **platformDevices;
|
||||
|
||||
std::unique_ptr<MockDevice> device(Device::create<MockDevice>(&localHwInfo));
|
||||
EXPECT_EQ(&localHwInfo, GmmHelper::hwInfo);
|
||||
}
|
||||
|
||||
TEST(GmmTest, whenResourceIsCreatedThenHandleItsOwnership) {
|
||||
struct MyMockResourecInfo : public GmmResourceInfo {
|
||||
using GmmResourceInfo::resourceInfo;
|
||||
|
||||
Reference in New Issue
Block a user