mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
Related-To: NEO-12197 Currently for new resources user thread must wait before submitting actual workload. With this commit, instead of waiting on user thread, request is sent to background ULLS controller thread and additional semaphore is programmed. ULLS controller will perform actual wait and signal semaphore when paging fence reaches required value. Signed-off-by: Szymon Morek <szymon.morek@intel.com>
51 lines
1.7 KiB
C++
51 lines
1.7 KiB
C++
/*
|
|
* Copyright (C) 2020-2024 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include "shared/source/direct_submission/direct_submission_hw.h"
|
|
#include "shared/source/os_interface/windows/windows_defs.h"
|
|
struct COMMAND_BUFFER_HEADER_REC;
|
|
typedef struct COMMAND_BUFFER_HEADER_REC COMMAND_BUFFER_HEADER;
|
|
|
|
namespace NEO {
|
|
|
|
class OsContextWin;
|
|
class Wddm;
|
|
|
|
template <typename GfxFamily, typename Dispatcher>
|
|
class WddmDirectSubmission : public DirectSubmissionHw<GfxFamily, Dispatcher> {
|
|
public:
|
|
WddmDirectSubmission(const DirectSubmissionInputParams &inputParams);
|
|
|
|
~WddmDirectSubmission() override;
|
|
|
|
void flushMonitorFence() override;
|
|
void unblockPagingFenceSemaphore(uint64_t pagingFenceValue) override;
|
|
|
|
protected:
|
|
bool allocateOsResources() override;
|
|
bool submit(uint64_t gpuAddress, size_t size) override;
|
|
|
|
bool handleResidency() override;
|
|
void handleCompletionFence(uint64_t completionValue, MonitoredFence &fence);
|
|
void ensureRingCompletion() override;
|
|
void handleSwitchRingBuffers(ResidencyContainer *allocationsForResidency) override;
|
|
void handleStopRingBuffer() override;
|
|
uint64_t updateTagValue(bool requireMonitorFence) override;
|
|
bool dispatchMonitorFenceRequired(bool requireMonitorFence) override;
|
|
MOCKABLE_VIRTUAL uint64_t updateTagValueImpl(uint32_t completionBufferIndex);
|
|
void getTagAddressValue(TagData &tagData) override;
|
|
bool isCompleted(uint32_t ringBufferIndex) override;
|
|
MOCKABLE_VIRTUAL void updateMonitorFenceValueForResidencyList(ResidencyContainer *allocationsForResidency);
|
|
|
|
OsContextWin *osContextWin;
|
|
Wddm *wddm;
|
|
MonitoredFence ringFence;
|
|
std::unique_ptr<COMMAND_BUFFER_HEADER> commandBufferHeader;
|
|
};
|
|
} // namespace NEO
|