mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
Change image with host ptr creation logic in multi device setup
When multi device config is available, then allocations are created in system memory pool. Related-To: NEO-5508 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0a84f88599
commit
c3143ccf1f
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
* Copyright (C) 2017-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -99,5 +99,6 @@ const cl_image_desc Image1dArrayDefaults::imageDesc = {
|
||||
static float imageMemory[imageWidth * imageHeight * imageDepth] = {};
|
||||
|
||||
void *Image1dDefaults::hostPtr = imageMemory;
|
||||
void *ImageWithoutHostPtr::hostPtr = nullptr;
|
||||
|
||||
NEO::Context *Image1dDefaults::context = nullptr;
|
||||
|
||||
@@ -55,6 +55,11 @@ struct LuminanceImage : public Image2dDefaults {
|
||||
static const cl_image_format imageFormat;
|
||||
};
|
||||
|
||||
struct ImageWithoutHostPtr : public Image1dDefaults {
|
||||
enum { flags = 0 };
|
||||
static void *hostPtr;
|
||||
};
|
||||
|
||||
template <typename BaseClass>
|
||||
struct ImageUseHostPtr : public BaseClass {
|
||||
enum { flags = BaseClass::flags | CL_MEM_USE_HOST_PTR };
|
||||
@@ -90,7 +95,6 @@ struct ImageHelper {
|
||||
Traits::hostPtr,
|
||||
retVal);
|
||||
|
||||
assert(image != nullptr);
|
||||
return image;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user