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