SWDEV-285332 - move common context into parent
Change-Id: I99ceb62ad948e1fa9d1dcaa5ede98626cc95bea7
[ROCm/clr commit: 6d09a83b2d]
This commit is contained in:
@@ -438,6 +438,7 @@ Device::Device()
|
||||
activeWait_(false),
|
||||
blitProgram_(nullptr),
|
||||
hwDebugMgr_(nullptr),
|
||||
context_(nullptr),
|
||||
vaCacheAccess_(nullptr),
|
||||
vaCacheMap_(nullptr),
|
||||
index_(0) {
|
||||
|
||||
@@ -1785,6 +1785,9 @@ class Device : public RuntimeObject {
|
||||
return false;
|
||||
}
|
||||
|
||||
//! Return context
|
||||
amd::Context& context() const { return *context_; }
|
||||
|
||||
//! Return private global device context for P2P allocations
|
||||
amd::Context& GlbCtx() const { return *glb_ctx_; }
|
||||
|
||||
@@ -1835,6 +1838,7 @@ class Device : public RuntimeObject {
|
||||
BlitProgram* blitProgram_; //!< Blit program info
|
||||
static AppProfile appProfile_; //!< application profile
|
||||
HwDebugManager* hwDebugMgr_; //!< Hardware Debug manager
|
||||
amd::Context* context_; //!< Context
|
||||
|
||||
static amd::Context* glb_ctx_; //!< Global context with all devices
|
||||
static amd::Monitor p2p_stage_ops_; //!< Lock to serialise cache for the P2P resources
|
||||
|
||||
@@ -804,7 +804,6 @@ Device::Device()
|
||||
: NullDevice(),
|
||||
CALGSLDevice(),
|
||||
numOfVgpus_(0),
|
||||
context_(NULL),
|
||||
heap_(),
|
||||
dummyPage_(NULL),
|
||||
lockAsyncOps_(NULL),
|
||||
|
||||
@@ -453,9 +453,6 @@ class Device : public NullDevice, public CALGSLDevice {
|
||||
//! Gets the GPU resource associated with the global heap
|
||||
const Memory& globalMem() const { return heap_.resource(); }
|
||||
|
||||
//! Gets the device context object
|
||||
amd::Context& context() const { return *context_; }
|
||||
|
||||
//! Gets the global heap object
|
||||
const Heap& heap() const { return heap_; }
|
||||
|
||||
@@ -576,7 +573,6 @@ class Device : public NullDevice, public CALGSLDevice {
|
||||
const VirtualGPU* vgpu //!< Virtual GPU for the allocation
|
||||
);
|
||||
|
||||
amd::Context* context_; //!< A dummy context for internal allocations
|
||||
Heap heap_; //!< GPU global heap
|
||||
amd::Memory* dummyPage_; //!< A dummy page for NULL pointer
|
||||
|
||||
|
||||
@@ -716,7 +716,6 @@ Device::ScopedLockVgpus::~ScopedLockVgpus() {
|
||||
Device::Device()
|
||||
: NullDevice(),
|
||||
numOfVgpus_(0),
|
||||
context_(nullptr),
|
||||
lockAsyncOps_("Device Async Ops Lock", true),
|
||||
lockForInitHeap_("Initialization of Heap Resource", true),
|
||||
lockPAL_("PAL Ops Lock", true),
|
||||
|
||||
@@ -517,9 +517,6 @@ class Device : public NullDevice {
|
||||
//! Returns PAL device interface
|
||||
Pal::IDevice* iDev() const { return device_; }
|
||||
|
||||
//! Return private device context for internal allocations
|
||||
amd::Context& context() const { return *context_; }
|
||||
|
||||
RgpCaptureMgr* rgpCaptureMgr() const { return rgpCaptureMgr_; }
|
||||
|
||||
//! Update free memory for OCL extension
|
||||
@@ -640,7 +637,6 @@ class Device : public NullDevice {
|
||||
static char* platformObj_; //!< Memory allocated for PAL platform object
|
||||
static Pal::IPlatform* platform_; //!< Pointer to the PAL platform object
|
||||
|
||||
amd::Context* context_; //!< A dummy context for internal allocations
|
||||
mutable amd::Monitor lockAsyncOps_; //!< Lock to serialise all async ops on this device
|
||||
//! Lock to serialise all async ops on initialization heap operation
|
||||
mutable amd::Monitor lockForInitHeap_;
|
||||
|
||||
@@ -153,7 +153,6 @@ Device::Device(hsa_agent_t bkendDevice)
|
||||
, pciDeviceId_(0)
|
||||
, gpuvm_segment_max_alloc_(0)
|
||||
, alloc_granularity_(0)
|
||||
, context_(nullptr)
|
||||
, xferQueue_(nullptr)
|
||||
, xferRead_(nullptr)
|
||||
, xferWrite_(nullptr)
|
||||
|
||||
@@ -429,8 +429,6 @@ class Device : public NullDevice {
|
||||
roc::Memory* getRocMemory(amd::Memory* mem //!< Pointer to AMD memory object
|
||||
) const;
|
||||
|
||||
amd::Context& context() const { return *context_; }
|
||||
|
||||
//! Create internal blit program
|
||||
bool createBlitProgram();
|
||||
|
||||
@@ -538,7 +536,6 @@ class Device : public NullDevice {
|
||||
size_t gpuvm_segment_max_alloc_;
|
||||
size_t alloc_granularity_;
|
||||
static constexpr bool offlineDevice_ = false;
|
||||
amd::Context* context_; //!< A dummy context for internal data transfer
|
||||
VirtualGPU* xferQueue_; //!< Transfer queue, created on demand
|
||||
|
||||
XferBuffers* xferRead_; //!< Transfer buffers read
|
||||
|
||||
Reference in New Issue
Block a user