|
6 | 6 | */ |
7 | 7 |
|
8 | 8 | #include "shared/source/command_container/command_encoder.h" |
| 9 | +#include "shared/source/gmm_helper/gmm_helper.h" |
9 | 10 | #include "shared/test/common/cmd_parse/gen_cmd_parse.h" |
10 | 11 | #include "shared/test/common/fixtures/device_fixture.h" |
11 | 12 | #include "shared/test/common/helpers/debug_manager_state_restore.h" |
@@ -241,12 +242,13 @@ HWTEST2_F(SingleAddressSpaceFixture, GivenOneNonZeroSbaAddressesWhenProgrammingS |
241 | 242 | cmdStream.replaceGraphicsAllocation(streamAllocation); |
242 | 243 | cmdStream.replaceBuffer(streamAllocation->getUnderlyingBuffer(), streamAllocation->getUnderlyingBufferSize()); |
243 | 244 |
|
244 | | - uint64_t ssba = 0x1234567000; |
| 245 | + uint64_t ssba = 0x0000800011112222; |
245 | 246 |
|
246 | 247 | NEO::Debugger::SbaAddresses sbaAddresses = {0}; |
247 | 248 | sbaAddresses.SurfaceStateBaseAddress = ssba; |
248 | 249 |
|
249 | | - debugger->programSbaTrackingCommandsSingleAddressSpace(cmdStream, sbaAddresses); |
| 250 | + debugger->singleAddressSpaceSbaTracking = true; |
| 251 | + debugger->captureStateBaseAddress(cmdStream, sbaAddresses); |
250 | 252 |
|
251 | 253 | GenCmdList cmdList; |
252 | 254 | ASSERT_TRUE(FamilyType::PARSE::parseCommandBuffer(cmdList, cmdStream.getCpuBase(), cmdStream.getUsed())); |
@@ -289,9 +291,17 @@ HWTEST2_F(SingleAddressSpaceFixture, GivenOneNonZeroSbaAddressesWhenProgrammingS |
289 | 291 |
|
290 | 292 | itor = find<MI_STORE_DATA_IMM *>(itor, cmdList.end()); |
291 | 293 | ASSERT_NE(cmdList.end(), itor); |
| 294 | + auto lowDword = genCmdCast<MI_STORE_DATA_IMM *>(*itor)->getDataDword0(); |
| 295 | + itor++; |
292 | 296 |
|
293 | 297 | itor = find<MI_STORE_DATA_IMM *>(itor, cmdList.end()); |
294 | 298 | ASSERT_NE(cmdList.end(), itor); |
| 299 | + auto highDword = genCmdCast<MI_STORE_DATA_IMM *>(*itor)->getDataDword0(); |
| 300 | + |
| 301 | + uint64_t foundSsba = ((static_cast<uint64_t>(highDword) & 0xffffffff) << 32) | lowDword; |
| 302 | + const auto gmmHelper = pDevice->getGmmHelper(); |
| 303 | + const auto ssbaCanonized = gmmHelper->canonize(ssba); |
| 304 | + EXPECT_EQ(ssbaCanonized, foundSsba); |
295 | 305 |
|
296 | 306 | itor = find<MI_ARB_CHECK *>(itor, cmdList.end()); |
297 | 307 | ASSERT_NE(cmdList.end(), itor); |
|
0 commit comments