mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 02:18:05 +08:00
L0debug - Canonize SBA in single address space mode
Signed-off-by: Brandon Yates<brandon.yates@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
83f63e0008
commit
76ef0bfb0a
@@ -41,7 +41,7 @@ void DebuggerL0Hw<GfxFamily>::captureStateBaseAddress(NEO::LinearStream &cmdStre
|
|||||||
sbaCanonized.IndirectObjectBaseAddress, sbaCanonized.InstructionBaseAddress, sbaCanonized.BindlessSurfaceStateBaseAddress);
|
sbaCanonized.IndirectObjectBaseAddress, sbaCanonized.InstructionBaseAddress, sbaCanonized.BindlessSurfaceStateBaseAddress);
|
||||||
|
|
||||||
if (singleAddressSpaceSbaTracking) {
|
if (singleAddressSpaceSbaTracking) {
|
||||||
programSbaTrackingCommandsSingleAddressSpace(cmdStream, sba);
|
programSbaTrackingCommandsSingleAddressSpace(cmdStream, sbaCanonized);
|
||||||
} else {
|
} else {
|
||||||
if (sbaCanonized.GeneralStateBaseAddress) {
|
if (sbaCanonized.GeneralStateBaseAddress) {
|
||||||
auto generalStateBaseAddress = sbaCanonized.GeneralStateBaseAddress;
|
auto generalStateBaseAddress = sbaCanonized.GeneralStateBaseAddress;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shared/source/command_container/command_encoder.h"
|
#include "shared/source/command_container/command_encoder.h"
|
||||||
|
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||||
#include "shared/test/common/fixtures/device_fixture.h"
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
@@ -241,12 +242,13 @@ HWTEST2_F(SingleAddressSpaceFixture, GivenOneNonZeroSbaAddressesWhenProgrammingS
|
|||||||
cmdStream.replaceGraphicsAllocation(streamAllocation);
|
cmdStream.replaceGraphicsAllocation(streamAllocation);
|
||||||
cmdStream.replaceBuffer(streamAllocation->getUnderlyingBuffer(), streamAllocation->getUnderlyingBufferSize());
|
cmdStream.replaceBuffer(streamAllocation->getUnderlyingBuffer(), streamAllocation->getUnderlyingBufferSize());
|
||||||
|
|
||||||
uint64_t ssba = 0x1234567000;
|
uint64_t ssba = 0x0000800011112222;
|
||||||
|
|
||||||
NEO::Debugger::SbaAddresses sbaAddresses = {0};
|
NEO::Debugger::SbaAddresses sbaAddresses = {0};
|
||||||
sbaAddresses.SurfaceStateBaseAddress = ssba;
|
sbaAddresses.SurfaceStateBaseAddress = ssba;
|
||||||
|
|
||||||
debugger->programSbaTrackingCommandsSingleAddressSpace(cmdStream, sbaAddresses);
|
debugger->singleAddressSpaceSbaTracking = true;
|
||||||
|
debugger->captureStateBaseAddress(cmdStream, sbaAddresses);
|
||||||
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::PARSE::parseCommandBuffer(cmdList, cmdStream.getCpuBase(), cmdStream.getUsed()));
|
ASSERT_TRUE(FamilyType::PARSE::parseCommandBuffer(cmdList, cmdStream.getCpuBase(), cmdStream.getUsed()));
|
||||||
@@ -289,9 +291,17 @@ HWTEST2_F(SingleAddressSpaceFixture, GivenOneNonZeroSbaAddressesWhenProgrammingS
|
|||||||
|
|
||||||
itor = find<MI_STORE_DATA_IMM *>(itor, cmdList.end());
|
itor = find<MI_STORE_DATA_IMM *>(itor, cmdList.end());
|
||||||
ASSERT_NE(cmdList.end(), itor);
|
ASSERT_NE(cmdList.end(), itor);
|
||||||
|
auto lowDword = genCmdCast<MI_STORE_DATA_IMM *>(*itor)->getDataDword0();
|
||||||
|
itor++;
|
||||||
|
|
||||||
itor = find<MI_STORE_DATA_IMM *>(itor, cmdList.end());
|
itor = find<MI_STORE_DATA_IMM *>(itor, cmdList.end());
|
||||||
ASSERT_NE(cmdList.end(), itor);
|
ASSERT_NE(cmdList.end(), itor);
|
||||||
|
auto highDword = genCmdCast<MI_STORE_DATA_IMM *>(*itor)->getDataDword0();
|
||||||
|
|
||||||
|
uint64_t foundSsba = ((static_cast<uint64_t>(highDword) & 0xffffffff) << 32) | lowDword;
|
||||||
|
const auto gmmHelper = pDevice->getGmmHelper();
|
||||||
|
const auto ssbaCanonized = gmmHelper->canonize(ssba);
|
||||||
|
EXPECT_EQ(ssbaCanonized, foundSsba);
|
||||||
|
|
||||||
itor = find<MI_ARB_CHECK *>(itor, cmdList.end());
|
itor = find<MI_ARB_CHECK *>(itor, cmdList.end());
|
||||||
ASSERT_NE(cmdList.end(), itor);
|
ASSERT_NE(cmdList.end(), itor);
|
||||||
|
|||||||
Reference in New Issue
Block a user