mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-23 11:03:02 +08:00
Cleanup includes 49
Cleaned up files: opencl/source/command_queue/command_queue_hw.h opencl/source/gtpin/gtpin_defs.h opencl/source/mem_obj/mem_obj_helper.h opencl/source/memory_manager/mem_obj_surface.h opencl/source/sharings/unified/unified_sharing.h opencl/test/unit_test/api/cl_enqueue_migrate_mem_objects_tests.inl opencl/test/unit_test/aub_tests/fixtures/unified_memory_fixture.h opencl/test/unit_test/command_queue/command_queue_fixture.h Related-To: NEO-5548 Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
64f735481d
commit
d1b2311207
34
opencl/source/memory_manager/mem_obj_surface.cpp
Normal file
34
opencl/source/memory_manager/mem_obj_surface.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/memory_manager/mem_obj_surface.h"
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
|
||||
#include "opencl/source/mem_obj/mem_obj.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
MemObjSurface::MemObjSurface(MemObj *memObj) : Surface(memObj->getMultiGraphicsAllocation().isCoherent()), memObj(memObj) {
|
||||
memObj->incRefInternal();
|
||||
}
|
||||
|
||||
MemObjSurface::~MemObjSurface() {
|
||||
memObj->decRefInternal();
|
||||
memObj = nullptr;
|
||||
};
|
||||
|
||||
void MemObjSurface::makeResident(CommandStreamReceiver &csr) {
|
||||
DEBUG_BREAK_IF(!memObj);
|
||||
csr.makeResident(*memObj->getGraphicsAllocation(csr.getRootDeviceIndex()));
|
||||
}
|
||||
|
||||
Surface *MemObjSurface::duplicate() {
|
||||
return new MemObjSurface(this->memObj);
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user