mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Create peekGmmHelper function in CSR
Related-To: NEO-6523 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
26221678aa
commit
a3745c28a3
@ -236,6 +236,10 @@ OSInterface *CommandStreamReceiver::getOSInterface() const {
|
||||
return executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->osInterface.get();
|
||||
}
|
||||
|
||||
GmmHelper *CommandStreamReceiver::peekGmmHelper() const {
|
||||
return executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->gmmHelper.get();
|
||||
}
|
||||
|
||||
uint64_t CommandStreamReceiver::getWorkPartitionAllocationGpuAddress() const {
|
||||
if (isStaticWorkPartitioningEnabled()) {
|
||||
return getWorkPartitionAllocation()->getGpuAddress();
|
||||
|
@ -118,6 +118,7 @@ class CommandStreamReceiver {
|
||||
LinearStream &getCS(size_t minRequiredSize = 1024u);
|
||||
OSInterface *getOSInterface() const;
|
||||
ExecutionEnvironment &peekExecutionEnvironment() const { return executionEnvironment; };
|
||||
GmmHelper *peekGmmHelper() const;
|
||||
|
||||
MOCKABLE_VIRTUAL void setTagAllocation(GraphicsAllocation *allocation);
|
||||
GraphicsAllocation *getTagAllocation() const {
|
||||
|
@ -327,7 +327,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenCompressedAllocationWhenCloningPageTa
|
||||
csr->setupContext(osContext);
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(csr->hardwareContextController->hardwareContexts[0].get());
|
||||
|
||||
MockGmm gmm(pDevice->executionEnvironment->rootDeviceEnvironments[0]->getGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER, false, {}, true);
|
||||
MockGmm gmm(csr->peekGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER, false, {}, true);
|
||||
gmm.isCompressionEnabled = true;
|
||||
|
||||
int dummy = 1;
|
||||
@ -357,7 +357,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenUncachedAllocationWhenCloningPageTabl
|
||||
csr->setupContext(osContext);
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(csr->hardwareContextController->hardwareContexts[0].get());
|
||||
|
||||
MockGmm gmm(pDevice->executionEnvironment->rootDeviceEnvironments[0]->getGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED, false, {}, true);
|
||||
MockGmm gmm(csr->peekGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED, false, {}, true);
|
||||
gmm.isCompressionEnabled = false;
|
||||
|
||||
int dummy = 1;
|
||||
@ -417,7 +417,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenCompressedTileInstancedAllocationWhen
|
||||
|
||||
csr->multiOsContextCapable = true;
|
||||
|
||||
MockGmm gmm(pDevice->executionEnvironment->rootDeviceEnvironments[0]->getGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER, false, {}, true);
|
||||
MockGmm gmm(csr->peekGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER, false, {}, true);
|
||||
gmm.isCompressionEnabled = true;
|
||||
|
||||
int dummy = 1;
|
||||
@ -456,7 +456,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenUncachedTileInstancedAllocationWhenWr
|
||||
|
||||
csr->multiOsContextCapable = true;
|
||||
|
||||
MockGmm gmm(pDevice->executionEnvironment->rootDeviceEnvironments[0]->getGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED, false, {}, true);
|
||||
MockGmm gmm(csr->peekGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED, false, {}, true);
|
||||
gmm.isCompressionEnabled = false;
|
||||
|
||||
int dummy = 1;
|
||||
|
Reference in New Issue
Block a user