mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 06:23:01 +08:00
Minor cleanup around L0 Fence
remove duplicated functions Change-Id: I815221835b87ab05317b2ac4436ea1321ccd7cab Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
13b8929832
commit
83ed9d9ee4
@@ -40,7 +40,7 @@ ze_result_t FenceImp::queryStatus() {
|
||||
return *hostAddr == Fence::STATE_CLEARED ? ZE_RESULT_NOT_READY : ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
bool FenceImp::initialize() {
|
||||
void FenceImp::initialize() {
|
||||
NEO::AllocationProperties properties(
|
||||
cmdQueue->getDevice()->getRootDeviceIndex(), MemoryConstants::cacheLineSize, NEO::GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY, cmdQueue->getDevice()->getNEODevice()->getDeviceBitfield());
|
||||
properties.alignment = MemoryConstants::cacheLineSize;
|
||||
@@ -48,8 +48,6 @@ bool FenceImp::initialize() {
|
||||
UNRECOVERABLE_IF(allocation == nullptr);
|
||||
|
||||
reset();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
ze_result_t FenceImp::reset() {
|
||||
|
||||
@@ -40,7 +40,7 @@ struct Fence : _ze_fence_handle_t {
|
||||
enum EnqueueState : uint32_t { ENQUEUE_NOT_READY = 0u,
|
||||
ENQUEUE_READY };
|
||||
|
||||
NEO::GraphicsAllocation &getAllocation() { return *allocation; }
|
||||
NEO::GraphicsAllocation &getAllocation() const { return *allocation; }
|
||||
|
||||
uint64_t getGpuAddress() {
|
||||
UNRECOVERABLE_IF(allocation == nullptr);
|
||||
@@ -67,11 +67,7 @@ struct FenceImp : public Fence {
|
||||
|
||||
ze_result_t reset() override;
|
||||
|
||||
static Fence *fromHandle(ze_fence_handle_t handle) { return static_cast<Fence *>(handle); }
|
||||
|
||||
inline ze_fence_handle_t toHandle() { return this; }
|
||||
|
||||
bool initialize();
|
||||
void initialize();
|
||||
|
||||
protected:
|
||||
CommandQueueImp *cmdQueue;
|
||||
|
||||
Reference in New Issue
Block a user