1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
/*
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/command_stream/device_command_stream.h"
#include "shared/source/command_stream/submission_status.h"
struct COMMAND_BUFFER_HEADER_REC; // NOLINT(readability-identifier-naming), forward declaration from sharedata_wrapper.h
namespace NEO {
class GmmPageTableMngr;
class GraphicsAllocation;
class WddmMemoryManager;
class Wddm;
template <typename GfxFamily>
class WddmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily> {
typedef DeviceCommandStreamReceiver<GfxFamily> BaseClass;
public:
WddmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, const DeviceBitfield deviceBitfield);
~WddmCommandStreamReceiver() override;
SubmissionStatus flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override;
SubmissionStatus processResidency(ResidencyContainer &allocationsForResidency, uint32_t handleId) override;
void processEviction() override;
bool waitForFlushStamp(FlushStamp &flushStampToWait) override;
bool isTlbFlushRequiredForStateCacheFlush() override;
WddmMemoryManager *getMemoryManager() const;
Wddm *peekWddm() const {
return wddm;
}
GmmPageTableMngr *createPageTableManager() override;
void flushMonitorFence(bool notifyKmd) override;
void setupContext(OsContext &osContext) override;
using CommandStreamReceiver::pageTableManager;
protected:
void addToEvictionContainer(GraphicsAllocation &gfxAllocation) override;
bool validForEnqueuePagingFence(uint64_t pagingFenceValue) const;
Wddm *wddm;
COMMAND_BUFFER_HEADER_REC *commandBufferHeader;
bool requiresBlockingResidencyHandling = true;
uint64_t lastEnqueuedPagingFenceValue = 0;
};
} // namespace NEO
|