SWDEV-272268, SWDEV-268186 - OCL change for Rebar optimization:fix regressions in OCLMemInfo and Conformance basic test

Change-Id: I3e709942b5f43ba52a4cb0824a2e6b3202d4b405
This commit is contained in:
Julia Jiang
2021-04-05 15:11:59 -04:00
committed by Julia Jiang
parent 2d41031aec
commit f22ceb0fd8
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -106,6 +106,12 @@ bool Memory::create(Resource::MemoryType memType, Resource::CreateParams* params
}
do {
// Assume that allocations will be placed into visible heap when ReBar is enabled
// Only enable this assumption for small size local buffers
constexpr size_t kLargeAlloc = (1ull << 27);
if ((memType == Local) && desc().buffer_ && (size() < kLargeAlloc) && dev().info().largeBar_) {
memType = Persistent;
}
// Create a resource in PAL
result = Resource::create(memType, params, forceLinear);
if (!result) {