mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 15:12:56 +08:00
New AllocationType for debugSurface
Related-To: NEO-4797 Change-Id: I851b6cc5b33fb286bea9d175506e932339701f93 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
81cc0afb1e
commit
5bd5784559
@@ -324,6 +324,8 @@ const char *FileLogger<DebugLevel>::getAllocationTypeString(GraphicsAllocation c
|
||||
return "UNKNOWN";
|
||||
case GraphicsAllocation::AllocationType::WRITE_COMBINED:
|
||||
return "WRITE_COMBINED";
|
||||
case GraphicsAllocation::AllocationType::DEBUG_CONTEXT_SAVE_AREA:
|
||||
return "DEBUG_CONTEXT_SAVE_AREA";
|
||||
default:
|
||||
return "ILLEGAL_VALUE";
|
||||
}
|
||||
|
||||
@@ -891,6 +891,14 @@ TEST(MemoryManagerTest, givenForceNonSystemMaskWhenAllocationTypeNotMatchesMaskT
|
||||
EXPECT_EQ(1u, allocationData.flags.useSystemMemory);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenDebugContextSaveAreaTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager mockMemoryManager;
|
||||
AllocationProperties properties{0, 1, GraphicsAllocation::AllocationType::DEBUG_CONTEXT_SAVE_AREA};
|
||||
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
|
||||
EXPECT_TRUE(allocData.flags.useSystemMemory);
|
||||
}
|
||||
|
||||
using MemoryManagerGetAlloctionDataHaveToBeForcedTo48BitTest = testing::TestWithParam<std::tuple<GraphicsAllocation::AllocationType, bool>>;
|
||||
|
||||
TEST_P(MemoryManagerGetAlloctionDataHaveToBeForcedTo48BitTest, givenAllocationTypesHaveToBeForcedTo48BitThenAllocationDataResource48BitIsSet) {
|
||||
@@ -967,6 +975,7 @@ static const GraphicsAllocation::AllocationType allocationHaveNotToBeForcedTo48B
|
||||
GraphicsAllocation::AllocationType::WRITE_COMBINED,
|
||||
GraphicsAllocation::AllocationType::RING_BUFFER,
|
||||
GraphicsAllocation::AllocationType::SEMAPHORE_BUFFER,
|
||||
GraphicsAllocation::AllocationType::DEBUG_CONTEXT_SAVE_AREA,
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(ForceTo48Bit,
|
||||
|
||||
@@ -930,7 +930,8 @@ AllocationTypeTestCase allocationTypeValues[] = {
|
||||
{GraphicsAllocation::AllocationType::GLOBAL_FENCE, "GLOBAL_FENCE"},
|
||||
{GraphicsAllocation::AllocationType::TIMESTAMP_PACKET_TAG_BUFFER, "TIMESTAMP_PACKET_TAG_BUFFER"},
|
||||
{GraphicsAllocation::AllocationType::UNKNOWN, "UNKNOWN"},
|
||||
{GraphicsAllocation::AllocationType::WRITE_COMBINED, "WRITE_COMBINED"}};
|
||||
{GraphicsAllocation::AllocationType::WRITE_COMBINED, "WRITE_COMBINED"},
|
||||
{GraphicsAllocation::AllocationType::DEBUG_CONTEXT_SAVE_AREA, "DEBUG_CONTEXT_SAVE_AREA"}};
|
||||
|
||||
class AllocationTypeLogging : public ::testing::TestWithParam<AllocationTypeTestCase> {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user