Add getter of Scratch Controller to the CommandStreamReceiver class

Change-Id: Iba0a9d7e4a9f141e1e31de428d50e7c745ad993a
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2019-05-21 17:25:05 +02:00
parent b82cdd6b8e
commit 7390e456a4
3 changed files with 7 additions and 3 deletions

View File

@@ -178,6 +178,10 @@ class CommandStreamReceiver {
BlitterConstants::BlitWithHostPtrDirection copyDirection, CsrDependencies &csrDependencies);
virtual void blitBuffer(Buffer &dstBuffer, Buffer &srcBuffer, uint64_t sourceSize, CsrDependencies &csrDependencies) = 0;
ScratchSpaceController *getScratchSpaceController() const {
return scratchSpaceController.get();
}
protected:
void cleanupResources();

View File

@@ -231,7 +231,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverHwTest, WhenCommandStreamReceiv
HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsNotRequiredThenScratchAllocationIsNotCreated) {
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment);
auto scratchController = commandStreamReceiver->scratchSpaceController.get();
auto scratchController = commandStreamReceiver->getScratchSpaceController();
bool stateBaseAddressDirty = false;
bool cfeStateDirty = false;
@@ -243,7 +243,7 @@ HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsNotRequiredThenScratchAl
HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsRequiredThenCorrectAddressIsReturned) {
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment);
auto scratchController = commandStreamReceiver->scratchSpaceController.get();
auto scratchController = commandStreamReceiver->getScratchSpaceController();
bool cfeStateDirty = false;
bool stateBaseAddressDirty = false;

View File

@@ -26,6 +26,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
using BaseClass::deviceIndex;
using BaseClass::dshState;
using BaseClass::getScratchPatchAddress;
using BaseClass::getScratchSpaceController;
using BaseClass::indirectHeap;
using BaseClass::iohState;
using BaseClass::programPreamble;
@@ -58,7 +59,6 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
using BaseClass::CommandStreamReceiver::requiredScratchSize;
using BaseClass::CommandStreamReceiver::requiredThreadArbitrationPolicy;
using BaseClass::CommandStreamReceiver::samplerCacheFlushRequired;
using BaseClass::CommandStreamReceiver::scratchSpaceController;
using BaseClass::CommandStreamReceiver::stallingPipeControlOnNextFlushRequired;
using BaseClass::CommandStreamReceiver::submissionAggregator;
using BaseClass::CommandStreamReceiver::taskCount;