mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Decanonize general state base address
Change-Id: I9c0bc92f5e11467d13c04fee4add85193e2a3c3f Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
|
||||
#include "reg_configs_common.h"
|
||||
#include "runtime/helpers/hw_helper.h"
|
||||
#include "runtime/gmm_helper/gmm_helper.h"
|
||||
#include "runtime/helpers/state_base_address.h"
|
||||
#include "runtime/memory_manager/internal_allocation_storage.h"
|
||||
#include "runtime/os_interface/os_context.h"
|
||||
#include "test.h"
|
||||
@@ -974,3 +976,17 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInNonDirtyStateAndBatching
|
||||
auto &surfacesForResidency = mockCsr->getResidencyAllocations();
|
||||
EXPECT_EQ(0u, surfacesForResidency.size());
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrWhenGeneralStateBaseAddressIsProgrammedThenDecanonizedAddressIsWritten) {
|
||||
uint64_t generalStateBaseAddress = 0xffff800400010000ull;
|
||||
StateBaseAddressHelper<FamilyType> helper;
|
||||
|
||||
helper.programStateBaseAddress(commandStream, dsh, ioh, ssh, generalStateBaseAddress, 0, generalStateBaseAddress, pDevice->getGmmHelper());
|
||||
|
||||
HardwareParse hwParser;
|
||||
hwParser.parseCommands<FamilyType>(commandStream);
|
||||
auto cmd = hwParser.getCommand<typename FamilyType::STATE_BASE_ADDRESS>();
|
||||
|
||||
EXPECT_NE(generalStateBaseAddress, cmd->getGeneralStateBaseAddress());
|
||||
EXPECT_EQ(GmmHelper::decanonize(generalStateBaseAddress), cmd->getGeneralStateBaseAddress());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user