2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2022-01-07 22:53:31 +08:00
|
|
|
* Copyright (C) 2018-2022 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2020-03-03 18:59:49 +08:00
|
|
|
#include "shared/source/command_stream/device_command_stream.h"
|
2022-01-07 22:53:31 +08:00
|
|
|
#include "shared/source/command_stream/submission_status.h"
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
struct COMMAND_BUFFER_HEADER_REC;
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
class GmmPageTableMngr;
|
|
|
|
class GraphicsAllocation;
|
|
|
|
class WddmMemoryManager;
|
|
|
|
class Wddm;
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
class WddmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily> {
|
|
|
|
typedef DeviceCommandStreamReceiver<GfxFamily> BaseClass;
|
|
|
|
|
|
|
|
public:
|
2020-10-29 22:33:35 +08:00
|
|
|
WddmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, const DeviceBitfield deviceBitfield);
|
2022-05-10 01:40:30 +08:00
|
|
|
~WddmCommandStreamReceiver() override;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2022-01-07 22:53:31 +08:00
|
|
|
SubmissionStatus flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override;
|
2022-11-15 18:04:19 +08:00
|
|
|
SubmissionStatus processResidency(const ResidencyContainer &allocationsForResidency, uint32_t handleId) override;
|
2018-11-26 21:04:52 +08:00
|
|
|
void processEviction() override;
|
2021-09-17 21:05:26 +08:00
|
|
|
bool waitForFlushStamp(FlushStamp &flushStampToWait) override;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2019-07-29 22:11:51 +08:00
|
|
|
WddmMemoryManager *getMemoryManager() const;
|
|
|
|
Wddm *peekWddm() const {
|
2017-12-21 07:45:38 +08:00
|
|
|
return wddm;
|
|
|
|
}
|
2018-08-17 19:38:09 +08:00
|
|
|
GmmPageTableMngr *createPageTableManager() override;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2021-09-29 23:59:41 +08:00
|
|
|
using CommandStreamReceiver::pageTableManager;
|
|
|
|
|
2017-12-21 07:45:38 +08:00
|
|
|
protected:
|
2018-09-25 18:38:00 +08:00
|
|
|
void kmDafLockAllocations(ResidencyContainer &allocationsForResidency);
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
Wddm *wddm;
|
|
|
|
COMMAND_BUFFER_HEADER_REC *commandBufferHeader;
|
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|