mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:41:26 +08:00
Debug mask support to force uncached Gmm usage type
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5f38555af5
commit
56a164ffcd
@@ -939,6 +939,24 @@ TEST(GmmTest, givenConstSurfaceWhenDebugFlagIsSetThenReturnUncachedType) {
|
||||
CacheSettingsHelper::getGmmUsageType(AllocationType::CONSTANT_SURFACE, false, *defaultHwInfo));
|
||||
}
|
||||
|
||||
TEST(GmmTest, givenUncachedDebugFlagMaskSetWhenAskingForUsageTypeThenReturnUncached) {
|
||||
DebugManagerStateRestore restore;
|
||||
|
||||
constexpr int64_t bufferMask = 1 << (static_cast<int64_t>(AllocationType::BUFFER) - 1);
|
||||
constexpr int64_t imageMask = 1 << (static_cast<int64_t>(AllocationType::IMAGE) - 1);
|
||||
|
||||
DebugManager.flags.ForceUncachedGmmUsageType.set(bufferMask | imageMask);
|
||||
|
||||
EXPECT_EQ(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED,
|
||||
CacheSettingsHelper::getGmmUsageType(AllocationType::BUFFER, false, *defaultHwInfo));
|
||||
|
||||
EXPECT_EQ(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED,
|
||||
CacheSettingsHelper::getGmmUsageType(AllocationType::IMAGE, false, *defaultHwInfo));
|
||||
|
||||
EXPECT_NE(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED,
|
||||
CacheSettingsHelper::getGmmUsageType(AllocationType::BUFFER_HOST_MEMORY, false, *defaultHwInfo));
|
||||
}
|
||||
|
||||
TEST(GmmTest, givenAllocationForStatefulAccessWhenDebugFlagIsSetThenReturnUncachedType) {
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.DisableCachingForStatefulBufferAccess.set(true);
|
||||
|
||||
@@ -422,4 +422,5 @@ DirectSubmissionInsertSfenceInstructionPriorToSubmission = -1
|
||||
EnableTimestampWaitForEvents = -1
|
||||
ForceWddmLowPriorityContextValue = -1
|
||||
EnableDebuggerMmapMemoryAccess = 0
|
||||
FailBuildProgramWithStatefulAccess = -1
|
||||
FailBuildProgramWithStatefulAccess = -1
|
||||
ForceUncachedGmmUsageType = 0
|
||||
Reference in New Issue
Block a user