SWDEV-412393 - Force alloc memory to avoid another hsa image creation.

Change-Id: Ia3cd99eb736231e6dfe013ebae6c41fd4cc657bc
Этот коммит содержится в:
Jaydeep Patel committed 2023-08-17 05:18:43 +00:00
1 родитель d6dc82b220
Коммит 289535e805
3 files changed
+12 -9

No files matched your search

+3 -2
Просмотреть файл
@@ -1195,7 +1195,8 @@ bool Image::Format::isSupported(const Context& context, cl_mem_object_type image
// ================================================================================================
Image* Image::createView(const Context& context, const Format& format, device::VirtualDevice* vDev,
uint baseMipLevel, cl_mem_flags flags, bool createMipmapView) {
uint baseMipLevel, cl_mem_flags flags, bool createMipmapView,
bool forceAlloc) {
// Find the image dimensions and create a corresponding object
Image* view = new (context) Image(format, *this, baseMipLevel, flags, createMipmapView);
@@ -1210,7 +1211,7 @@ Image* Image::createView(const Context& context, const Format& format, device::V
view->initDeviceMemory();
// Check if runtime has to allocate memory
if ((context.devices().size() == 1) || DISABLE_DEFERRED_ALLOC) {
if ((context.devices().size() == 1) || DISABLE_DEFERRED_ALLOC || forceAlloc) {
for (uint i = 0; i < numDevices_; ++i) {
// Make sure the parent's device memory is avaialbe
if ((deviceMemories_[i].ref_ != nullptr) &&