Refactor StateBaseAddressHelper

Change-Id: I5071a1a4a067b8f0e880a4f7e1d65e79eeb77c47
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2020-08-03 13:13:58 +02:00
committed by sys_ocldev
parent a168040f61
commit c3a128f9f4
12 changed files with 97 additions and 90 deletions

View File

@@ -72,6 +72,7 @@ struct MockOsContext : public OsContext {
GEN12LPTEST_F(CommandEncoderTest, givenVariousEngineTypesWhenEncodeSBAThenAdditionalPipelineSelectWAIsAppliedOnlyToRcs) {
using PIPELINE_SELECT = typename FamilyType::PIPELINE_SELECT;
using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE;
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
CommandContainer cmdContainer;
@@ -79,7 +80,8 @@ GEN12LPTEST_F(CommandEncoderTest, givenVariousEngineTypesWhenEncodeSBAThenAdditi
ASSERT_TRUE(ret);
{
EncodeStateBaseAddress<FamilyType>::encode(cmdContainer);
STATE_BASE_ADDRESS sba;
EncodeStateBaseAddress<FamilyType>::encode(cmdContainer, sba);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer.getCommandStream()->getCpuBase(), 0), cmdContainer.getCommandStream()->getUsed());
@@ -92,7 +94,8 @@ GEN12LPTEST_F(CommandEncoderTest, givenVariousEngineTypesWhenEncodeSBAThenAdditi
{
static_cast<MockOsContext *>(pDevice->getDefaultEngine().osContext)->engineType = aub_stream::ENGINE_CCS;
EncodeStateBaseAddress<FamilyType>::encode(cmdContainer);
STATE_BASE_ADDRESS sba;
EncodeStateBaseAddress<FamilyType>::encode(cmdContainer, sba);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer.getCommandStream()->getCpuBase(), 0), cmdContainer.getCommandStream()->getUsed());