mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
refactor: don't use global ProductHelper getter 12/n
Related-To: NEO-6853 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
438ae37aef
commit
b101f9f2f5
@@ -420,7 +420,7 @@ HWTEST_F(DirectSubmissionTest,
|
||||
|
||||
EXPECT_TRUE(ret);
|
||||
|
||||
size_t tagUpdateSize = Dispatcher::getSizeMonitorFence(*directSubmission.hwInfo);
|
||||
size_t tagUpdateSize = Dispatcher::getSizeMonitorFence(directSubmission.rootDeviceEnvironment);
|
||||
|
||||
size_t disabledSizeEnd = directSubmission.getSizeEnd(false);
|
||||
EXPECT_EQ(disabledSizeEnd, regularSizeEnd + tagUpdateSize);
|
||||
@@ -502,7 +502,7 @@ HWTEST_F(DirectSubmissionTest, givenDirectSubmissionWhenDispatchTagUpdateSection
|
||||
EXPECT_TRUE(ret);
|
||||
Dispatcher::dispatchMonitorFence(directSubmission.ringCommandStream, 0ull, 0ull, directSubmission.rootDeviceEnvironment, false, false, directSubmission.dcFlushRequired);
|
||||
EXPECT_NE(0x0u, directSubmission.ringCommandStream.getUsed());
|
||||
EXPECT_EQ(Dispatcher::getSizeMonitorFence(*directSubmission.hwInfo), directSubmission.ringCommandStream.getUsed());
|
||||
EXPECT_EQ(Dispatcher::getSizeMonitorFence(directSubmission.rootDeviceEnvironment), directSubmission.ringCommandStream.getUsed());
|
||||
}
|
||||
|
||||
HWTEST_F(DirectSubmissionTest, givenDirectSubmissionWhenDispatchEndingSectionThenExpectCorrectSizeUsed) {
|
||||
@@ -525,7 +525,7 @@ HWTEST_F(DirectSubmissionTest, givenDirectSubmissionWhenGetDispatchSizeThenExpec
|
||||
|
||||
size_t expectedSize = directSubmission.getSizeStartSection() +
|
||||
Dispatcher::getSizeCacheFlush(*directSubmission.hwInfo) +
|
||||
Dispatcher::getSizeMonitorFence(*directSubmission.hwInfo) +
|
||||
Dispatcher::getSizeMonitorFence(directSubmission.rootDeviceEnvironment) +
|
||||
directSubmission.getSizeSemaphoreSection(false);
|
||||
|
||||
size_t actualSize = directSubmission.getSizeDispatch(false, false);
|
||||
@@ -542,7 +542,7 @@ HWTEST_F(DirectSubmissionTest,
|
||||
|
||||
size_t expectedSize = Dispatcher::getSizeStoreDwordCommand() +
|
||||
Dispatcher::getSizeCacheFlush(*directSubmission.hwInfo) +
|
||||
Dispatcher::getSizeMonitorFence(*directSubmission.hwInfo) +
|
||||
Dispatcher::getSizeMonitorFence(directSubmission.rootDeviceEnvironment) +
|
||||
directSubmission.getSizeSemaphoreSection(false);
|
||||
size_t actualSize = directSubmission.getSizeDispatch(false, false);
|
||||
EXPECT_EQ(expectedSize, actualSize);
|
||||
@@ -557,7 +557,7 @@ HWTEST_F(DirectSubmissionTest,
|
||||
MockDirectSubmissionHw<FamilyType, Dispatcher> directSubmission(*pDevice->getDefaultEngine().commandStreamReceiver);
|
||||
directSubmission.workloadMode = 2;
|
||||
size_t expectedSize = Dispatcher::getSizeCacheFlush(*directSubmission.hwInfo) +
|
||||
Dispatcher::getSizeMonitorFence(*directSubmission.hwInfo) +
|
||||
Dispatcher::getSizeMonitorFence(directSubmission.rootDeviceEnvironment) +
|
||||
directSubmission.getSizeSemaphoreSection(false);
|
||||
size_t actualSize = directSubmission.getSizeDispatch(false, false);
|
||||
EXPECT_EQ(expectedSize, actualSize);
|
||||
@@ -570,7 +570,7 @@ HWTEST_F(DirectSubmissionTest,
|
||||
MockDirectSubmissionHw<FamilyType, Dispatcher> directSubmission(*pDevice->getDefaultEngine().commandStreamReceiver);
|
||||
directSubmission.disableCacheFlush = true;
|
||||
size_t expectedSize = directSubmission.getSizeStartSection() +
|
||||
Dispatcher::getSizeMonitorFence(*directSubmission.hwInfo) +
|
||||
Dispatcher::getSizeMonitorFence(directSubmission.rootDeviceEnvironment) +
|
||||
directSubmission.getSizeSemaphoreSection(false);
|
||||
|
||||
size_t actualSize = directSubmission.getSizeDispatch(false, false);
|
||||
|
||||
@@ -269,7 +269,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
|
||||
bool ret = directSubmission.allocateResources();
|
||||
EXPECT_TRUE(ret);
|
||||
|
||||
size_t tagUpdateSize = Dispatcher::getSizeMonitorFence(*directSubmission.hwInfo);
|
||||
size_t tagUpdateSize = Dispatcher::getSizeMonitorFence(directSubmission.rootDeviceEnvironment);
|
||||
|
||||
size_t disabledSizeDispatch = directSubmission.getSizeDispatch(false, false);
|
||||
EXPECT_EQ(disabledSizeDispatch, (regularSizeDispatch - tagUpdateSize));
|
||||
@@ -2727,7 +2727,7 @@ HWTEST2_F(DirectSubmissionRelaxedOrderingTests, givenRelaxedOrderingSchedulerReq
|
||||
(Dispatcher::getSizeStartCommandBuffer() - Dispatcher::getSizeStopCommandBuffer()) +
|
||||
MemoryConstants::cacheLineSize;
|
||||
if (directSubmission.disableMonitorFence) {
|
||||
expectedBaseEndSize += Dispatcher::getSizeMonitorFence(pDevice->getHardwareInfo());
|
||||
expectedBaseEndSize += Dispatcher::getSizeMonitorFence(pDevice->getRootDeviceEnvironment());
|
||||
}
|
||||
|
||||
EXPECT_EQ(expectedBaseEndSize + directSubmission.getSizeDispatchRelaxedOrderingQueueStall(), directSubmission.getSizeEnd(true));
|
||||
|
||||
@@ -28,7 +28,7 @@ HWTEST_F(BlitterDispatcheTest, givenBlitterWhenDispatchingPreemptionCmdThenDispa
|
||||
|
||||
HWTEST_F(BlitterDispatcheTest, givenBlitterWhenAskingForMonitorFenceCmdSizeThenReturnExpectedNumberOfMiFlush) {
|
||||
size_t expectedSize = EncodeMiFlushDW<FamilyType>::getMiFlushDwCmdSizeForDataWrite();
|
||||
EXPECT_EQ(expectedSize, BlitterDispatcher<FamilyType>::getSizeMonitorFence(pDevice->getHardwareInfo()));
|
||||
EXPECT_EQ(expectedSize, BlitterDispatcher<FamilyType>::getSizeMonitorFence(pDevice->getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
HWTEST_F(BlitterDispatcheTest, givenBlitterWhenDispatchingMonitorFenceCmdThenDispatchMiFlushWithPostSync) {
|
||||
|
||||
@@ -52,9 +52,9 @@ HWTEST_F(RenderDispatcherTest, givenRenderWhenAddingPreemptionCmdThenExpectPrope
|
||||
}
|
||||
|
||||
HWTEST_F(RenderDispatcherTest, givenRenderWhenAskingForMonitorFenceCmdSizeThenReturnRequiredPipeControlCmdSize) {
|
||||
size_t expectedSize = MemorySynchronizationCommands<FamilyType>::getSizeForBarrierWithPostSyncOperation(hardwareInfo, false);
|
||||
size_t expectedSize = MemorySynchronizationCommands<FamilyType>::getSizeForBarrierWithPostSyncOperation(this->pDevice->getRootDeviceEnvironment(), false);
|
||||
|
||||
EXPECT_EQ(expectedSize, RenderDispatcher<FamilyType>::getSizeMonitorFence(hardwareInfo));
|
||||
EXPECT_EQ(expectedSize, RenderDispatcher<FamilyType>::getSizeMonitorFence(this->pDevice->getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
HWTEST_F(RenderDispatcherTest, givenRenderWhenAddingMonitorFenceCmdThenExpectPipeControlWithProperAddressAndValue) {
|
||||
|
||||
@@ -523,7 +523,7 @@ HWTEST_F(DrmDirectSubmissionTest, givenDisabledMonitorFenceWhenDispatchSwitchRin
|
||||
auto *pipeControl = hwParse.getCommand<PIPE_CONTROL>();
|
||||
|
||||
EXPECT_NE(pipeControl, nullptr);
|
||||
EXPECT_EQ(directSubmission.getSizeSwitchRingBufferSection(), Dispatcher::getSizeStartCommandBuffer() + Dispatcher::getSizeMonitorFence(device->getHardwareInfo()));
|
||||
EXPECT_EQ(directSubmission.getSizeSwitchRingBufferSection(), Dispatcher::getSizeStartCommandBuffer() + Dispatcher::getSizeMonitorFence(device->getRootDeviceEnvironment()));
|
||||
|
||||
directSubmission.currentTagData.tagValue--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user