@@ -1147,19 +1147,28 @@ HWTEST_F(CommandStreamReceiverTest, whenCreatingCommandStreamReceiverThenLastAdd
11471147
11481148HWTEST_F (CommandStreamReceiverTest, givenDebugFlagWhenCreatingCsrThenSetEnableStaticPartitioningAccordingly) {
11491149 DebugManagerStateRestore restore{};
1150+
11501151 {
1151- MockDevice device{};
1152- EXPECT_FALSE (device.getUltCommandStreamReceiver <FamilyType>().staticWorkPartitioningEnabled );
1152+ UltDeviceFactory deviceFactory{1 , 2 };
1153+ MockDevice &device = *deviceFactory.rootDevices [0 ];
1154+ EXPECT_FALSE (device.getGpgpuCommandStreamReceiver ().isStaticWorkPartitioningEnabled ());
1155+ EXPECT_EQ (0u , device.getGpgpuCommandStreamReceiver ().getWorkPartitionAllocationGpuAddress ());
11531156 }
11541157 {
11551158 DebugManager.flags .EnableStaticPartitioning .set (0 );
1156- MockDevice device{};
1157- EXPECT_FALSE (device.getUltCommandStreamReceiver <FamilyType>().staticWorkPartitioningEnabled );
1159+ UltDeviceFactory deviceFactory{1 , 2 };
1160+ MockDevice &device = *deviceFactory.rootDevices [0 ];
1161+ EXPECT_FALSE (device.getGpgpuCommandStreamReceiver ().isStaticWorkPartitioningEnabled ());
1162+ EXPECT_EQ (0u , device.getGpgpuCommandStreamReceiver ().getWorkPartitionAllocationGpuAddress ());
11581163 }
11591164 {
11601165 DebugManager.flags .EnableStaticPartitioning .set (1 );
1161- MockDevice device{};
1162- EXPECT_TRUE (device.getUltCommandStreamReceiver <FamilyType>().staticWorkPartitioningEnabled );
1166+ UltDeviceFactory deviceFactory{1 , 2 };
1167+ MockDevice &device = *deviceFactory.rootDevices [0 ];
1168+ EXPECT_TRUE (device.getGpgpuCommandStreamReceiver ().isStaticWorkPartitioningEnabled ());
1169+ EXPECT_NE (0u , device.getGpgpuCommandStreamReceiver ().getWorkPartitionAllocationGpuAddress ());
1170+ const auto gpuVa = device.getGpgpuCommandStreamReceiver ().getWorkPartitionAllocation ()->getGpuAddress ();
1171+ EXPECT_EQ (gpuVa, device.getGpgpuCommandStreamReceiver ().getWorkPartitionAllocationGpuAddress ());
11631172 }
11641173}
11651174
0 commit comments