2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2024-01-19 12:38:56 +00:00
|
|
|
* Copyright (C) 2018-2024 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-19 20:54:29 -07:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2023-01-25 15:26:00 +00:00
|
|
|
#include "shared/source/command_stream/csr_definitions.h"
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/command_stream/linear_stream.h"
|
2021-08-27 15:23:29 +00:00
|
|
|
#include "shared/source/command_stream/stream_properties.h"
|
2023-01-17 17:04:14 +00:00
|
|
|
#include "shared/source/helpers/blit_properties_container.h"
|
2023-02-24 16:55:21 +00:00
|
|
|
#include "shared/source/helpers/cache_policy.h"
|
2023-09-04 09:42:02 +00:00
|
|
|
#include "shared/source/helpers/common_types.h"
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/helpers/completion_stamp.h"
|
|
|
|
|
#include "shared/source/helpers/options.h"
|
2020-11-06 13:01:29 +01:00
|
|
|
#include "shared/source/utilities/spinlock.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2023-11-27 13:47:52 +00:00
|
|
|
#include "aubstream/allocation_params.h"
|
|
|
|
|
|
2023-01-17 17:04:14 +00:00
|
|
|
#include <atomic>
|
2017-12-21 00:45:38 +01:00
|
|
|
#include <cstddef>
|
|
|
|
|
#include <cstdint>
|
2023-01-17 17:04:14 +00:00
|
|
|
#include <functional>
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2023-02-16 16:51:55 +00:00
|
|
|
|
2023-11-17 12:14:15 +00:00
|
|
|
enum class AllocationType;
|
2023-01-24 15:33:52 +00:00
|
|
|
enum class DebugPauseState : uint32_t;
|
2023-01-17 17:04:14 +00:00
|
|
|
struct BatchBuffer;
|
2023-02-16 16:51:55 +00:00
|
|
|
struct HardwareInfo;
|
2023-01-17 17:04:14 +00:00
|
|
|
struct WaitParams;
|
|
|
|
|
class SubmissionAggregator;
|
|
|
|
|
class FlushStampTracker;
|
2022-12-22 11:31:28 +00:00
|
|
|
class Thread;
|
|
|
|
|
class FlatBatchBufferHelper;
|
2018-10-29 12:26:58 +00:00
|
|
|
class AllocationsList;
|
2017-12-21 00:45:38 +01:00
|
|
|
class Device;
|
2018-10-22 15:17:32 +02:00
|
|
|
class ExecutionEnvironment;
|
2018-07-05 11:23:28 +02:00
|
|
|
class ExperimentalCommandBuffer;
|
2018-10-22 15:17:32 +02:00
|
|
|
class GmmPageTableMngr;
|
2018-07-05 11:23:28 +02:00
|
|
|
class GraphicsAllocation;
|
2018-10-29 10:38:53 +01:00
|
|
|
class HostPtrSurface;
|
2018-04-17 13:50:50 +02:00
|
|
|
class IndirectHeap;
|
2018-10-22 15:17:32 +02:00
|
|
|
class InternalAllocationStorage;
|
2018-07-05 11:23:28 +02:00
|
|
|
class LinearStream;
|
2017-12-21 00:45:38 +01:00
|
|
|
class MemoryManager;
|
2021-02-25 09:38:48 +01:00
|
|
|
class MultiGraphicsAllocation;
|
2018-08-27 15:48:29 +02:00
|
|
|
class OsContext;
|
2018-10-22 15:17:32 +02:00
|
|
|
class OSInterface;
|
2018-11-22 15:16:20 +01:00
|
|
|
class ScratchSpaceController;
|
2021-03-24 18:21:13 +00:00
|
|
|
class HwPerfCounter;
|
|
|
|
|
class HwTimeStamps;
|
2022-07-24 04:21:16 +00:00
|
|
|
class GmmHelper;
|
2021-03-24 18:21:13 +00:00
|
|
|
class TagAllocatorBase;
|
2022-11-10 09:37:42 +00:00
|
|
|
class KmdNotifyHelper;
|
2022-12-09 14:37:32 +00:00
|
|
|
class GfxCoreHelper;
|
2022-12-15 12:13:57 +00:00
|
|
|
class ProductHelper;
|
2023-05-12 14:49:39 +00:00
|
|
|
class ReleaseHelper;
|
2023-01-17 17:04:14 +00:00
|
|
|
enum class WaitStatus;
|
|
|
|
|
struct AubSubCaptureStatus;
|
2020-09-15 09:33:12 +02:00
|
|
|
|
2023-09-25 07:45:36 +00:00
|
|
|
template <typename TSize, uint32_t packetCount>
|
2021-03-22 15:14:49 +00:00
|
|
|
class TimestampPackets;
|
2018-11-27 13:07:41 +01:00
|
|
|
|
|
|
|
|
template <typename T1>
|
|
|
|
|
class TagAllocator;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2018-04-04 11:34:46 +02:00
|
|
|
enum class DispatchMode {
|
2023-12-13 09:17:24 +00:00
|
|
|
deviceDefault = 0, // default for given device
|
|
|
|
|
immediateDispatch, // everything is submitted to the HW immediately
|
|
|
|
|
adaptiveDispatch, // dispatching is handled to async thread, which combines batch buffers basing on load (not implemented)
|
|
|
|
|
batchedDispatchWithCounter, // dispatching is batched, after n commands there is implicit flush (not implemented)
|
|
|
|
|
batchedDispatch // dispatching is batched, explicit clFlush is required
|
2018-04-04 11:34:46 +02:00
|
|
|
};
|
|
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
class CommandStreamReceiver {
|
|
|
|
|
public:
|
2022-04-06 13:59:23 +00:00
|
|
|
static constexpr size_t startingResidencyContainerSize = 128;
|
|
|
|
|
|
2018-01-10 14:05:34 +01:00
|
|
|
enum class SamplerCacheFlushState {
|
|
|
|
|
samplerCacheFlushNotRequired,
|
2022-07-24 04:21:16 +00:00
|
|
|
samplerCacheFlushBefore, // add sampler cache flush before Walker with redescribed image
|
|
|
|
|
samplerCacheFlushAfter // add sampler cache flush after Walker with redescribed image
|
2018-01-10 14:05:34 +01:00
|
|
|
};
|
2020-04-30 17:12:01 +02:00
|
|
|
|
2018-08-06 14:55:04 +02:00
|
|
|
using MutexType = std::recursive_mutex;
|
2022-09-19 10:20:14 +00:00
|
|
|
using TimeType = std::chrono::high_resolution_clock::time_point;
|
2020-10-29 15:33:35 +01:00
|
|
|
CommandStreamReceiver(ExecutionEnvironment &executionEnvironment,
|
|
|
|
|
uint32_t rootDeviceIndex,
|
|
|
|
|
const DeviceBitfield deviceBitfield);
|
2017-12-21 00:45:38 +01:00
|
|
|
virtual ~CommandStreamReceiver();
|
|
|
|
|
|
2022-01-07 14:53:31 +00:00
|
|
|
virtual SubmissionStatus flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) = 0;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2022-11-30 14:57:18 +00:00
|
|
|
virtual CompletionStamp flushTask(LinearStream &commandStreamTask, size_t commandStreamTaskStart,
|
2022-03-28 12:55:12 +00:00
|
|
|
const IndirectHeap *dsh, const IndirectHeap *ioh, const IndirectHeap *ssh,
|
2022-11-22 13:53:59 +00:00
|
|
|
TaskCountType taskLevel, DispatchFlags &dispatchFlags, Device &device) = 0;
|
2022-11-30 14:57:18 +00:00
|
|
|
virtual CompletionStamp flushBcsTask(LinearStream &commandStream, size_t commandStreamStart, const DispatchBcsFlags &dispatchBcsFlags, const HardwareInfo &hwInfo) = 0;
|
2023-06-01 13:21:48 +00:00
|
|
|
virtual CompletionStamp flushImmediateTask(LinearStream &immediateCommandStream, size_t immediateCommandStreamStart,
|
|
|
|
|
ImmediateDispatchFlags &dispatchFlags, Device &device) = 0;
|
2023-03-27 21:37:18 +00:00
|
|
|
virtual SubmissionStatus sendRenderStateCacheFlush() = 0;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-11-24 14:50:41 +01:00
|
|
|
virtual bool flushBatchedSubmissions() = 0;
|
2022-01-07 14:53:31 +00:00
|
|
|
MOCKABLE_VIRTUAL SubmissionStatus submitBatchBuffer(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency);
|
2021-10-01 18:19:37 +00:00
|
|
|
virtual void pollForCompletion() {}
|
2020-05-22 18:11:28 +02:00
|
|
|
virtual void programHardwareContext(LinearStream &cmdStream) = 0;
|
2020-05-27 15:30:31 +02:00
|
|
|
virtual size_t getCmdsSizeForHardwareContext() const = 0;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2021-05-14 16:46:50 +00:00
|
|
|
void makeResident(MultiGraphicsAllocation &gfxAllocation);
|
2019-12-03 18:22:29 +01:00
|
|
|
MOCKABLE_VIRTUAL void makeResident(GraphicsAllocation &gfxAllocation);
|
2017-12-21 00:45:38 +01:00
|
|
|
virtual void makeNonResident(GraphicsAllocation &gfxAllocation);
|
2022-05-27 03:58:07 +00:00
|
|
|
MOCKABLE_VIRTUAL void makeSurfacePackNonResident(ResidencyContainer &allocationsForResidency, bool clearAllocations);
|
2022-12-22 11:31:28 +00:00
|
|
|
virtual SubmissionStatus processResidency(const ResidencyContainer &allocationsForResidency, uint32_t handleId);
|
2018-11-26 14:04:52 +01:00
|
|
|
virtual void processEviction();
|
2018-02-08 22:52:58 +01:00
|
|
|
void makeResidentHostPtrAllocation(GraphicsAllocation *gfxAllocation);
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2020-09-30 16:58:20 +02:00
|
|
|
MOCKABLE_VIRTUAL void ensureCommandBufferAllocation(LinearStream &commandStream, size_t minimumRequiredSize, size_t additionalAllocationSize);
|
2019-02-20 10:31:32 +01:00
|
|
|
|
2018-10-11 11:19:49 +02:00
|
|
|
MemoryManager *getMemoryManager() const;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2018-09-11 11:19:21 +02:00
|
|
|
ResidencyContainer &getResidencyAllocations();
|
2018-09-12 10:44:35 +02:00
|
|
|
ResidencyContainer &getEvictionAllocations();
|
2023-09-04 09:42:02 +00:00
|
|
|
PrivateAllocsToReuseContainer &getOwnedPrivateAllocations();
|
2018-09-11 11:19:21 +02:00
|
|
|
|
2018-08-17 13:38:09 +02:00
|
|
|
virtual GmmPageTableMngr *createPageTableManager() { return nullptr; }
|
2021-10-06 12:42:30 +00:00
|
|
|
bool needsPageTableManager() const;
|
2018-08-17 13:38:09 +02:00
|
|
|
|
2022-11-22 13:53:59 +00:00
|
|
|
MOCKABLE_VIRTUAL WaitStatus waitForTaskCount(TaskCountType requiredTaskCount);
|
|
|
|
|
WaitStatus waitForTaskCountAndCleanAllocationList(TaskCountType requiredTaskCount, uint32_t allocationUsage);
|
|
|
|
|
MOCKABLE_VIRTUAL WaitStatus waitForTaskCountAndCleanTemporaryAllocationList(TaskCountType requiredTaskCount);
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
LinearStream &getCS(size_t minRequiredSize = 1024u);
|
2020-02-03 13:24:53 +01:00
|
|
|
OSInterface *getOSInterface() const;
|
2022-07-24 04:21:16 +00:00
|
|
|
ExecutionEnvironment &peekExecutionEnvironment() const { return executionEnvironment; }
|
2022-04-28 09:05:59 +00:00
|
|
|
GmmHelper *peekGmmHelper() const;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
MOCKABLE_VIRTUAL void setTagAllocation(GraphicsAllocation *allocation);
|
2018-04-03 12:23:14 +02:00
|
|
|
GraphicsAllocation *getTagAllocation() const {
|
|
|
|
|
return tagAllocation;
|
|
|
|
|
}
|
2021-02-25 09:38:48 +01:00
|
|
|
MultiGraphicsAllocation *getTagsMultiAllocation() const {
|
|
|
|
|
return tagsMultiAllocation;
|
|
|
|
|
}
|
2021-03-11 14:23:53 +00:00
|
|
|
MultiGraphicsAllocation &createTagsMultiAllocation();
|
2023-02-06 10:12:34 +00:00
|
|
|
|
|
|
|
|
TaskCountType getNextBarrierCount() { return this->barrierCount.fetch_add(1u); }
|
2023-02-07 06:00:02 +00:00
|
|
|
TaskCountType peekBarrierCount() const { return this->barrierCount.load(); }
|
2022-11-22 13:53:59 +00:00
|
|
|
volatile TagAddressType *getTagAddress() const { return tagAddress; }
|
2023-02-06 10:12:34 +00:00
|
|
|
volatile TagAddressType *getBarrierCountTagAddress() const { return this->barrierCountTagAddress; }
|
|
|
|
|
uint64_t getBarrierCountGpuAddress() const;
|
2022-12-06 07:32:34 +00:00
|
|
|
uint64_t getDebugPauseStateGPUAddress() const;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2022-07-24 04:21:16 +00:00
|
|
|
virtual bool waitForFlushStamp(FlushStamp &flushStampToWait) { return true; }
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2022-11-22 13:53:59 +00:00
|
|
|
TaskCountType peekTaskCount() const { return taskCount; }
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2022-11-22 13:53:59 +00:00
|
|
|
TaskCountType peekTaskLevel() const { return taskLevel; }
|
2019-07-10 07:57:54 +02:00
|
|
|
FlushStamp obtainCurrentFlushStamp() const;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2022-11-22 13:53:59 +00:00
|
|
|
TaskCountType peekLatestSentTaskCount() const { return latestSentTaskCount; }
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2022-11-22 13:53:59 +00:00
|
|
|
TaskCountType peekLatestFlushedTaskCount() const { return latestFlushedTaskCount; }
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2018-04-26 11:43:47 +02:00
|
|
|
void enableNTo1SubmissionModel() { this->nTo1SubmissionModelEnabled = true; }
|
|
|
|
|
bool isNTo1SubmissionModelEnabled() const { return this->nTo1SubmissionModelEnabled; }
|
2018-04-04 11:34:46 +02:00
|
|
|
void overrideDispatchPolicy(DispatchMode overrideValue) { this->dispatchMode = overrideValue; }
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2018-12-13 11:06:28 +01:00
|
|
|
void setMediaVFEStateDirty(bool dirty) { mediaVfeStateDirty = dirty; }
|
2023-03-10 13:20:23 +00:00
|
|
|
bool getMediaVFEStateDirty() const { return mediaVfeStateDirty; }
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2023-04-28 09:38:31 +00:00
|
|
|
void setGSBAStateDirty(bool dirty) { gsbaStateDirty = dirty; }
|
|
|
|
|
bool getGSBAStateDirty() const { return gsbaStateDirty; }
|
2023-03-10 13:20:23 +00:00
|
|
|
|
|
|
|
|
void setStateComputeModeDirty(bool dirty) { stateComputeModeDirty = dirty; }
|
|
|
|
|
bool getStateComputeModeDirty() const { return stateComputeModeDirty; }
|
2021-02-04 22:02:23 +05:30
|
|
|
|
2023-03-30 20:03:12 +00:00
|
|
|
void setBtdCommandDirty(bool dirty) { btdCommandDirty = dirty; }
|
|
|
|
|
bool getBtdCommandDirty() const { return btdCommandDirty; }
|
|
|
|
|
bool isRayTracingStateProgramingNeeded(Device &device) const;
|
|
|
|
|
|
2024-01-23 10:41:31 +00:00
|
|
|
void setRequiredScratchSizes(uint32_t newRequiredScratchSlot0Size, uint32_t newRequiredPrivateScratchSlot1Size);
|
2018-11-22 15:16:20 +01:00
|
|
|
GraphicsAllocation *getScratchAllocation();
|
2018-11-27 13:07:41 +01:00
|
|
|
GraphicsAllocation *getDebugSurfaceAllocation() const { return debugSurface; }
|
2018-03-21 12:58:30 +01:00
|
|
|
GraphicsAllocation *allocateDebugSurface(size_t size);
|
2019-06-27 21:33:05 +02:00
|
|
|
GraphicsAllocation *getPreemptionAllocation() const { return preemptionAllocation; }
|
2020-05-22 18:11:28 +02:00
|
|
|
GraphicsAllocation *getGlobalFenceAllocation() const { return globalFenceAllocation; }
|
2021-02-16 17:04:00 +00:00
|
|
|
GraphicsAllocation *getWorkPartitionAllocation() const { return workPartitionAllocation; }
|
2023-03-06 20:33:50 +00:00
|
|
|
GraphicsAllocation *getGlobalStatelessHeapAllocation() const { return globalStatelessHeapAllocation; }
|
2019-11-12 13:59:37 +01:00
|
|
|
|
2022-11-22 13:53:59 +00:00
|
|
|
virtual WaitStatus waitForTaskCountWithKmdNotifyFallback(TaskCountType taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep, QueueThrottle throttle) = 0;
|
|
|
|
|
virtual WaitStatus waitForCompletionWithTimeout(const WaitParams ¶ms, TaskCountType taskCountToWait);
|
|
|
|
|
WaitStatus baseWaitFunction(volatile TagAddressType *pollAddress, const WaitParams ¶ms, TaskCountType taskCountToWait);
|
|
|
|
|
MOCKABLE_VIRTUAL bool testTaskCountReady(volatile TagAddressType *pollAddress, TaskCountType taskCountToWait);
|
2020-05-13 11:25:29 +02:00
|
|
|
virtual void downloadAllocations(){};
|
2023-10-31 15:44:14 +00:00
|
|
|
virtual void removeDownloadAllocation(GraphicsAllocation *alloc){};
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2018-01-10 14:05:34 +01:00
|
|
|
void setSamplerCacheFlushRequired(SamplerCacheFlushState value) { this->samplerCacheFlushRequired = value; }
|
|
|
|
|
|
2018-11-27 13:07:41 +01:00
|
|
|
FlatBatchBufferHelper &getFlatBatchBufferHelper() const { return *flatBatchBufferHelper; }
|
2023-01-17 17:04:14 +00:00
|
|
|
void overwriteFlatBatchBufferHelper(FlatBatchBufferHelper *newHelper);
|
2018-03-14 11:07:51 +01:00
|
|
|
|
2018-06-12 20:33:03 +02:00
|
|
|
MOCKABLE_VIRTUAL void initProgrammingFlags();
|
2021-09-22 19:25:21 +00:00
|
|
|
virtual AubSubCaptureStatus checkAndActivateAubSubCapture(const std::string &kernelName);
|
2019-06-03 09:57:27 +02:00
|
|
|
void programForAubSubCapture(bool wasActiveInPreviousEnqueue, bool isActive);
|
2019-04-01 09:33:19 +02:00
|
|
|
virtual void addAubComment(const char *comment);
|
2018-06-12 20:33:03 +02:00
|
|
|
|
2022-12-22 11:31:28 +00:00
|
|
|
IndirectHeap &getIndirectHeap(IndirectHeapType heapType, size_t minRequiredSize);
|
|
|
|
|
void allocateHeapMemory(IndirectHeapType heapType, size_t minRequiredSize, IndirectHeap *&indirectHeap);
|
|
|
|
|
void releaseIndirectHeap(IndirectHeapType heapType);
|
2023-02-02 18:57:24 +00:00
|
|
|
void *getIndirectHeapCurrentPtr(IndirectHeapType heapType) const;
|
2018-04-26 10:01:01 +02:00
|
|
|
|
2022-11-25 16:51:17 +00:00
|
|
|
virtual enum CommandStreamReceiverType getType() const = 0;
|
2018-07-05 11:23:28 +02:00
|
|
|
void setExperimentalCmdBuffer(std::unique_ptr<ExperimentalCommandBuffer> &&cmdBuffer);
|
2018-06-06 10:34:51 +02:00
|
|
|
|
2018-07-16 17:11:43 +02:00
|
|
|
bool initializeTagAllocation();
|
2021-02-16 17:04:00 +00:00
|
|
|
MOCKABLE_VIRTUAL bool createWorkPartitionAllocation(const Device &device);
|
2020-02-05 20:00:08 +01:00
|
|
|
MOCKABLE_VIRTUAL bool createGlobalFenceAllocation();
|
2019-06-27 21:33:05 +02:00
|
|
|
MOCKABLE_VIRTUAL bool createPreemptionAllocation();
|
2019-09-04 16:44:27 +02:00
|
|
|
MOCKABLE_VIRTUAL bool createPerDssBackedBuffer(Device &device);
|
2022-09-01 15:54:57 +00:00
|
|
|
[[nodiscard]] MOCKABLE_VIRTUAL std::unique_lock<MutexType> obtainUniqueOwnership();
|
2018-07-16 17:11:43 +02:00
|
|
|
|
2018-09-06 09:03:07 +02:00
|
|
|
bool peekTimestampPacketWriteEnabled() const { return timestampPacketWriteEnabled; }
|
|
|
|
|
|
2022-03-03 09:56:18 +00:00
|
|
|
bool isLatestTaskCountFlushed() {
|
|
|
|
|
return this->peekLatestFlushedTaskCount() == this->peekTaskCount();
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-12 15:32:07 +00:00
|
|
|
size_t defaultSshSize = 0u;
|
2021-03-31 20:21:59 +00:00
|
|
|
bool canUse4GbHeaps = true;
|
2018-08-29 13:39:27 +02:00
|
|
|
|
2018-10-29 12:26:58 +00:00
|
|
|
AllocationsList &getTemporaryAllocations();
|
|
|
|
|
AllocationsList &getAllocationsForReuse();
|
2022-07-13 15:05:42 +00:00
|
|
|
AllocationsList &getDeferredAllocations();
|
2018-10-22 15:17:32 +02:00
|
|
|
InternalAllocationStorage *getInternalAllocationStorage() const { return internalAllocationStorage.get(); }
|
2019-05-06 10:50:25 +02:00
|
|
|
MOCKABLE_VIRTUAL bool createAllocationForHostSurface(HostPtrSurface &surface, bool requiresL3Flush);
|
2020-02-03 10:52:12 +01:00
|
|
|
virtual size_t getPreferredTagPoolSize() const;
|
2022-10-13 15:53:33 +00:00
|
|
|
virtual void fillReusableAllocationsList();
|
2019-01-10 09:37:56 +01:00
|
|
|
virtual void setupContext(OsContext &osContext) { this->osContext = &osContext; }
|
2018-11-26 14:04:52 +01:00
|
|
|
OsContext &getOsContext() const { return *osContext; }
|
2023-02-11 22:03:06 +00:00
|
|
|
bool initializeResources();
|
2021-03-24 18:21:13 +00:00
|
|
|
TagAllocatorBase *getEventTsAllocator();
|
|
|
|
|
TagAllocatorBase *getEventPerfCountAllocator(const uint32_t tagSize);
|
2021-03-29 14:46:41 +00:00
|
|
|
virtual TagAllocatorBase *getTimestampPacketAllocator() = 0;
|
2023-01-19 16:11:39 +00:00
|
|
|
virtual std::unique_ptr<TagAllocatorBase> createMultiRootDeviceTimestampPacketAllocator(const RootDeviceIndicesContainer rootDeviceIndices) = 0;
|
2018-11-27 13:07:41 +01:00
|
|
|
|
2020-03-19 13:48:13 +01:00
|
|
|
virtual bool expectMemory(const void *gfxAddress, const void *srcAddress, size_t length, uint32_t compareOperation);
|
2023-10-18 13:54:46 +00:00
|
|
|
MOCKABLE_VIRTUAL bool writeMemory(GraphicsAllocation &gfxAllocation) { return writeMemory(gfxAllocation, false, 0, 0); }
|
|
|
|
|
virtual bool writeMemory(GraphicsAllocation &gfxAllocation, bool isChunkCopy, uint64_t gpuVaChunkOffset, size_t chunkSize) { return false; }
|
2023-11-27 13:47:52 +00:00
|
|
|
virtual void writeMemoryAub(aub_stream::AllocationParams &allocationParams){};
|
2018-11-28 15:32:13 +01:00
|
|
|
|
2019-09-12 17:30:13 +02:00
|
|
|
virtual bool isMultiOsContextCapable() const = 0;
|
2018-02-08 22:52:58 +01:00
|
|
|
|
2023-01-04 09:45:07 +00:00
|
|
|
virtual MemoryCompressionState getMemoryCompressionState(bool auxTranslationRequired) const = 0;
|
2020-12-17 00:36:45 +00:00
|
|
|
|
2022-11-22 13:53:59 +00:00
|
|
|
void setLatestSentTaskCount(TaskCountType latestSentTaskCount) {
|
2019-03-18 15:23:18 +01:00
|
|
|
this->latestSentTaskCount = latestSentTaskCount;
|
|
|
|
|
}
|
2022-11-22 13:53:59 +00:00
|
|
|
void setLatestFlushedTaskCount(TaskCountType latestFlushedTaskCount) {
|
2021-11-12 10:38:26 +00:00
|
|
|
this->latestFlushedTaskCount = latestFlushedTaskCount;
|
|
|
|
|
}
|
2019-03-18 15:23:18 +01:00
|
|
|
|
2022-11-22 13:53:59 +00:00
|
|
|
virtual TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) = 0;
|
2019-04-03 15:59:31 +02:00
|
|
|
|
2022-11-09 11:18:06 +00:00
|
|
|
virtual SubmissionStatus flushTagUpdate() = 0;
|
2021-02-23 08:48:08 +00:00
|
|
|
virtual void updateTagFromWait() = 0;
|
2023-03-27 09:06:13 +00:00
|
|
|
virtual bool isUpdateTagFromWaitEnabled() = 0;
|
2023-08-07 13:33:24 +00:00
|
|
|
virtual void flushMonitorFence(){};
|
2021-02-23 08:48:08 +00:00
|
|
|
|
2019-05-21 17:25:05 +02:00
|
|
|
ScratchSpaceController *getScratchSpaceController() const {
|
|
|
|
|
return scratchSpaceController.get();
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-29 15:31:51 +00:00
|
|
|
void downloadAllocation(GraphicsAllocation &gfxAllocation);
|
2021-12-27 10:43:20 +00:00
|
|
|
|
2019-08-27 19:14:24 +02:00
|
|
|
void registerInstructionCacheFlush() {
|
|
|
|
|
auto mutex = obtainUniqueOwnership();
|
|
|
|
|
requiresInstructionCacheFlush = true;
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-19 21:09:44 +02:00
|
|
|
bool isLocalMemoryEnabled() const { return localMemoryEnabled; }
|
|
|
|
|
|
2022-04-19 14:44:06 +00:00
|
|
|
uint32_t getRootDeviceIndex() const { return rootDeviceIndex; }
|
2019-11-07 14:15:04 +01:00
|
|
|
|
2023-06-27 15:41:05 +00:00
|
|
|
MOCKABLE_VIRTUAL void startControllingDirectSubmissions();
|
2021-10-29 11:54:52 +00:00
|
|
|
|
2023-03-27 09:06:13 +00:00
|
|
|
bool isAnyDirectSubmissionEnabled() {
|
2021-11-16 13:26:36 +00:00
|
|
|
return this->isDirectSubmissionEnabled() || isBlitterDirectSubmissionEnabled();
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-19 14:44:06 +00:00
|
|
|
virtual bool initDirectSubmission() {
|
2020-01-15 17:02:47 +01:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual bool isDirectSubmissionEnabled() const {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-26 20:13:10 +01:00
|
|
|
virtual bool isBlitterDirectSubmissionEnabled() const {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-21 14:55:39 +00:00
|
|
|
virtual bool directSubmissionRelaxedOrderingEnabled() const {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-13 14:37:41 +00:00
|
|
|
virtual bool isKmdWaitOnTaskCountAllowed() const {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-05 08:55:12 +00:00
|
|
|
virtual void stopDirectSubmission(bool blocking) {}
|
2021-07-30 09:56:58 +00:00
|
|
|
|
2021-02-19 10:37:39 +00:00
|
|
|
bool isStaticWorkPartitioningEnabled() const {
|
|
|
|
|
return staticWorkPartitioningEnabled;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint64_t getWorkPartitionAllocationGpuAddress() const;
|
|
|
|
|
|
2022-01-12 16:57:42 +00:00
|
|
|
MOCKABLE_VIRTUAL bool isRcs() const;
|
2020-03-19 15:15:51 +01:00
|
|
|
|
2020-09-04 16:18:12 -07:00
|
|
|
virtual void initializeDefaultsForInternalEngine(){};
|
|
|
|
|
|
2020-11-18 23:58:42 +00:00
|
|
|
virtual GraphicsAllocation *getClearColorAllocation() = 0;
|
|
|
|
|
|
2021-05-19 21:41:59 +00:00
|
|
|
virtual void postInitFlagsSetup() = 0;
|
|
|
|
|
|
2021-06-17 11:55:28 +00:00
|
|
|
bool isUsedNotifyEnableForPostSync() const {
|
|
|
|
|
return useNotifyEnableForPostSync;
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-27 15:23:29 +00:00
|
|
|
NEO::StreamProperties &getStreamProperties() {
|
|
|
|
|
return this->streamProperties;
|
|
|
|
|
}
|
|
|
|
|
|
2021-09-17 13:05:26 +00:00
|
|
|
inline void setActivePartitions(uint32_t newPartitionCount) {
|
|
|
|
|
activePartitions = newPartitionCount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline uint32_t getActivePartitions() const {
|
|
|
|
|
return activePartitions;
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-19 22:58:46 +01:00
|
|
|
bool skipResourceCleanup() const;
|
|
|
|
|
|
2021-11-17 19:51:43 +00:00
|
|
|
inline bool isProgramActivePartitionConfigRequired() const {
|
|
|
|
|
return this->isDirectSubmissionEnabled() ? false : this->activePartitionsConfig != this->activePartitions;
|
|
|
|
|
}
|
|
|
|
|
|
2021-09-29 15:59:41 +00:00
|
|
|
std::unique_ptr<GmmPageTableMngr> pageTableManager;
|
|
|
|
|
|
2023-06-06 15:11:09 +00:00
|
|
|
inline uint32_t getImmWritePostSyncWriteOffset() const {
|
|
|
|
|
return immWritePostSyncWriteOffset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline uint32_t getTimeStampPostSyncWriteOffset() const {
|
|
|
|
|
return timeStampPostSyncWriteOffset;
|
2021-11-30 14:41:26 +00:00
|
|
|
}
|
|
|
|
|
|
2021-12-10 21:31:34 +00:00
|
|
|
inline bool isMultiTileOperationEnabled() const {
|
|
|
|
|
return (activePartitions > 1) && staticWorkPartitioningEnabled;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void programComputeBarrierCommand(LinearStream &cmdStream) = 0;
|
|
|
|
|
virtual size_t getCmdsSizeForComputeBarrierCommand() const = 0;
|
|
|
|
|
|
2023-09-12 14:17:52 +00:00
|
|
|
virtual void programStallingCommandsForBarrier(LinearStream &cmdStream, TimestampPacketContainer *barrierTimestampPacketNodes, const bool isDcFlushRequired) = 0;
|
|
|
|
|
|
2022-01-11 19:41:57 +00:00
|
|
|
const HardwareInfo &peekHwInfo() const;
|
2022-04-19 14:44:06 +00:00
|
|
|
const RootDeviceEnvironment &peekRootDeviceEnvironment() const;
|
2022-01-11 19:41:57 +00:00
|
|
|
|
2022-12-09 14:37:32 +00:00
|
|
|
const GfxCoreHelper &getGfxCoreHelper() const;
|
2022-12-15 12:13:57 +00:00
|
|
|
const ProductHelper &getProductHelper() const;
|
2023-05-12 14:49:39 +00:00
|
|
|
const ReleaseHelper *getReleaseHelper() const;
|
2022-12-09 14:37:32 +00:00
|
|
|
|
2022-02-16 10:22:03 +00:00
|
|
|
MOCKABLE_VIRTUAL bool isGpuHangDetected() const;
|
2022-09-19 10:20:14 +00:00
|
|
|
MOCKABLE_VIRTUAL bool checkGpuHangDetected(TimeType currentTime, TimeType &lastHangCheckTime) const;
|
2022-02-16 10:22:03 +00:00
|
|
|
|
2022-12-06 07:32:34 +00:00
|
|
|
uint64_t getCompletionAddress() const;
|
2022-03-30 12:40:09 +00:00
|
|
|
|
2022-11-22 13:53:59 +00:00
|
|
|
TaskCountType getCompletionValue(const GraphicsAllocation &gfxAllocation);
|
2022-04-28 10:33:22 +00:00
|
|
|
DispatchMode getDispatchMode() const {
|
|
|
|
|
return this->dispatchMode;
|
|
|
|
|
}
|
2022-03-30 12:40:09 +00:00
|
|
|
|
2022-07-26 13:54:00 +00:00
|
|
|
bool getPreambleSetFlag() const {
|
|
|
|
|
return isPreambleSent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void setPreambleSetFlag(bool value) {
|
|
|
|
|
isPreambleSent = value;
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-06 14:12:49 +00:00
|
|
|
bool getSipSentFlag() const {
|
|
|
|
|
return isStateSipSent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void setSipSentFlag(bool value) {
|
|
|
|
|
isStateSipSent = value;
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-27 15:35:15 +00:00
|
|
|
PreemptionMode getPreemptionMode() const {
|
|
|
|
|
return lastPreemptionMode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void setPreemptionMode(PreemptionMode value) {
|
|
|
|
|
lastPreemptionMode = value;
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-10 11:28:41 +00:00
|
|
|
virtual SubmissionStatus initializeDeviceWithFirstSubmission() = 0;
|
2022-09-19 13:34:14 +00:00
|
|
|
|
2023-03-09 13:22:23 +00:00
|
|
|
uint32_t getNumClients() const {
|
2022-10-06 12:21:52 +00:00
|
|
|
return this->numClients.load();
|
|
|
|
|
}
|
2023-09-25 07:58:39 +00:00
|
|
|
void registerClient(void *client);
|
|
|
|
|
void unregisterClient(void *client);
|
2022-10-06 12:21:52 +00:00
|
|
|
|
2022-10-11 10:37:19 +00:00
|
|
|
bool getDcFlushSupport() const {
|
|
|
|
|
return dcFlushSupport;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool getDcFlushRequired(bool externalCondition) const {
|
|
|
|
|
return externalCondition ? dcFlushSupport : false;
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-22 11:31:28 +00:00
|
|
|
bool isTbxMode() const;
|
2023-01-13 10:36:23 +00:00
|
|
|
bool ensureTagAllocationForRootDeviceIndex(uint32_t rootDeviceIndex);
|
2022-11-25 16:51:17 +00:00
|
|
|
|
2023-02-24 16:55:21 +00:00
|
|
|
L1CachePolicy *getStoredL1CachePolicy() {
|
|
|
|
|
return &l1CachePolicyData;
|
|
|
|
|
}
|
2023-03-06 20:33:50 +00:00
|
|
|
void createGlobalStatelessHeap();
|
|
|
|
|
IndirectHeap *getGlobalStatelessHeap() {
|
|
|
|
|
return globalStatelessHeap.get();
|
|
|
|
|
}
|
2023-02-24 16:55:21 +00:00
|
|
|
|
2023-03-15 12:57:15 +00:00
|
|
|
bool isRecyclingTagForHeapStorageRequired() const { return heapStorageRequiresRecyclingTag; }
|
|
|
|
|
|
2023-07-25 14:09:20 +00:00
|
|
|
virtual bool waitUserFence(TaskCountType waitValue, uint64_t hostAddress, int64_t timeout) { return false; }
|
|
|
|
|
|
2023-10-27 15:54:45 +00:00
|
|
|
void requestPreallocation();
|
|
|
|
|
void releasePreallocationRequest();
|
2023-11-17 12:14:15 +00:00
|
|
|
void preallocateAllocation(AllocationType type, size_t size);
|
2023-10-27 15:54:45 +00:00
|
|
|
void preallocateCommandBuffer();
|
2023-11-17 12:14:15 +00:00
|
|
|
void preallocateInternalHeap();
|
2023-10-27 15:54:45 +00:00
|
|
|
|
2023-11-15 09:01:43 +00:00
|
|
|
bool isInitialized() const {
|
|
|
|
|
return this->resourcesInitialized;
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-30 10:57:42 +01:00
|
|
|
protected:
|
|
|
|
|
void cleanupResources();
|
2020-04-30 13:24:34 +02:00
|
|
|
void printDeviceIndex();
|
2022-11-22 13:53:59 +00:00
|
|
|
void checkForNewResources(TaskCountType submittedTaskCount, TaskCountType allocationTaskCount, GraphicsAllocation &gfxAllocation);
|
2020-09-22 16:29:34 +02:00
|
|
|
bool checkImplicitFlushForGpuIdle();
|
2022-11-22 13:53:59 +00:00
|
|
|
void downloadTagAllocation(TaskCountType taskCountToWait);
|
|
|
|
|
void printTagAddressContent(TaskCountType taskCountToWait, int64_t waitTimeout, bool start);
|
2022-09-01 15:54:57 +00:00
|
|
|
[[nodiscard]] MOCKABLE_VIRTUAL std::unique_lock<MutexType> obtainHostPtrSurfaceCreationLock();
|
2019-01-30 10:57:42 +01:00
|
|
|
|
2023-09-25 07:58:39 +00:00
|
|
|
std::vector<void *> registeredClients;
|
|
|
|
|
|
2018-11-05 11:52:19 +01:00
|
|
|
std::unique_ptr<FlushStampTracker> flushStamp;
|
|
|
|
|
std::unique_ptr<SubmissionAggregator> submissionAggregator;
|
|
|
|
|
std::unique_ptr<FlatBatchBufferHelper> flatBatchBufferHelper;
|
|
|
|
|
std::unique_ptr<ExperimentalCommandBuffer> experimentalCmdBuffer;
|
|
|
|
|
std::unique_ptr<InternalAllocationStorage> internalAllocationStorage;
|
2023-10-27 15:54:45 +00:00
|
|
|
std::atomic<uint32_t> preallocatedAmount{0};
|
|
|
|
|
std::atomic<uint32_t> requestedPreallocationsAmount{0};
|
|
|
|
|
|
2018-11-05 11:52:19 +01:00
|
|
|
std::unique_ptr<KmdNotifyHelper> kmdNotifyHelper;
|
2018-11-22 15:16:20 +01:00
|
|
|
std::unique_ptr<ScratchSpaceController> scratchSpaceController;
|
2021-03-24 18:21:13 +00:00
|
|
|
std::unique_ptr<TagAllocatorBase> profilingTimeStampAllocator;
|
|
|
|
|
std::unique_ptr<TagAllocatorBase> perfCounterAllocator;
|
|
|
|
|
std::unique_ptr<TagAllocatorBase> timestampPacketAllocator;
|
2020-10-28 16:08:37 +01:00
|
|
|
std::unique_ptr<Thread> userPauseConfirmation;
|
2023-03-06 20:33:50 +00:00
|
|
|
std::unique_ptr<IndirectHeap> globalStatelessHeap;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2018-11-05 11:52:19 +01:00
|
|
|
ResidencyContainer residencyAllocations;
|
|
|
|
|
ResidencyContainer evictionAllocations;
|
2023-09-04 09:42:02 +00:00
|
|
|
PrivateAllocsToReuseContainer ownedPrivateAllocations;
|
2023-08-10 15:40:21 +00:00
|
|
|
|
2018-11-05 11:52:19 +01:00
|
|
|
MutexType ownershipMutex;
|
2021-10-06 19:34:44 +02:00
|
|
|
MutexType hostPtrSurfaceCreationMutex;
|
2023-09-25 07:58:39 +00:00
|
|
|
MutexType registeredClientsMutex;
|
2018-11-05 11:52:19 +01:00
|
|
|
ExecutionEnvironment &executionEnvironment;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2018-11-05 11:52:19 +01:00
|
|
|
LinearStream commandStream;
|
2021-09-17 13:05:26 +00:00
|
|
|
StreamProperties streamProperties{};
|
2022-09-20 16:46:15 +00:00
|
|
|
FrontEndPropertiesSupport feSupportFlags{};
|
2022-09-22 01:44:06 +00:00
|
|
|
PipelineSelectPropertiesSupport pipelineSupportFlags{};
|
2023-02-02 18:57:24 +00:00
|
|
|
StateBaseAddressPropertiesSupport sbaSupportFlags{};
|
2023-02-24 16:55:21 +00:00
|
|
|
L1CachePolicy l1CachePolicyData{};
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2020-10-28 16:08:37 +01:00
|
|
|
uint64_t totalMemoryUsed = 0u;
|
2020-04-30 17:12:01 +02:00
|
|
|
|
2022-11-22 13:53:59 +00:00
|
|
|
volatile TagAddressType *tagAddress = nullptr;
|
2023-02-06 10:12:34 +00:00
|
|
|
volatile TagAddressType *barrierCountTagAddress = nullptr;
|
2021-08-31 11:37:13 +00:00
|
|
|
volatile DebugPauseState *debugPauseStateAddress = nullptr;
|
2020-11-06 13:01:29 +01:00
|
|
|
SpinLock debugPauseStateLock;
|
2020-06-17 11:31:08 +02:00
|
|
|
static void *asyncDebugBreakConfirmation(void *arg);
|
2023-01-17 17:04:14 +00:00
|
|
|
static std::function<void()> debugConfirmationFunction;
|
2022-03-29 15:31:51 +00:00
|
|
|
std::function<void(GraphicsAllocation &)> downloadAllocationImpl;
|
2018-11-05 11:52:19 +01:00
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
GraphicsAllocation *tagAllocation = nullptr;
|
2020-02-05 20:00:08 +01:00
|
|
|
GraphicsAllocation *globalFenceAllocation = nullptr;
|
2019-06-27 21:33:05 +02:00
|
|
|
GraphicsAllocation *preemptionAllocation = nullptr;
|
2018-11-05 11:52:19 +01:00
|
|
|
GraphicsAllocation *debugSurface = nullptr;
|
2019-09-04 16:44:27 +02:00
|
|
|
GraphicsAllocation *perDssBackedBuffer = nullptr;
|
2020-11-18 23:58:42 +00:00
|
|
|
GraphicsAllocation *clearColorAllocation = nullptr;
|
2021-02-16 17:04:00 +00:00
|
|
|
GraphicsAllocation *workPartitionAllocation = nullptr;
|
2023-03-06 20:33:50 +00:00
|
|
|
GraphicsAllocation *globalStatelessHeapAllocation = nullptr;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2021-02-25 09:38:48 +01:00
|
|
|
MultiGraphicsAllocation *tagsMultiAllocation = nullptr;
|
|
|
|
|
|
2023-12-13 16:09:52 +00:00
|
|
|
IndirectHeap *indirectHeap[IndirectHeapType::numTypes];
|
2020-10-28 16:08:37 +01:00
|
|
|
OsContext *osContext = nullptr;
|
2022-11-22 13:53:59 +00:00
|
|
|
TaskCountType *completionFenceValuePointer = nullptr;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2023-02-06 10:12:34 +00:00
|
|
|
std::atomic<TaskCountType> barrierCount{0};
|
2018-11-05 11:52:19 +01:00
|
|
|
// current taskLevel. Used for determining if a PIPE_CONTROL is needed.
|
2022-11-22 13:53:59 +00:00
|
|
|
std::atomic<TaskCountType> taskLevel{0};
|
|
|
|
|
std::atomic<TaskCountType> latestSentTaskCount{0};
|
|
|
|
|
std::atomic<TaskCountType> latestFlushedTaskCount{0};
|
2020-10-28 16:08:37 +01:00
|
|
|
// taskCount - # of tasks submitted
|
2022-11-22 13:53:59 +00:00
|
|
|
std::atomic<TaskCountType> taskCount{0};
|
2018-11-05 11:52:19 +01:00
|
|
|
|
2022-10-06 12:21:52 +00:00
|
|
|
std::atomic<uint32_t> numClients = 0u;
|
|
|
|
|
|
2023-12-13 09:17:24 +00:00
|
|
|
DispatchMode dispatchMode = DispatchMode::immediateDispatch;
|
2018-11-05 11:52:19 +01:00
|
|
|
SamplerCacheFlushState samplerCacheFlushRequired = SamplerCacheFlushState::samplerCacheFlushNotRequired;
|
2018-02-08 13:41:02 +01:00
|
|
|
PreemptionMode lastPreemptionMode = PreemptionMode::Initial;
|
2020-04-30 17:12:01 +02:00
|
|
|
|
2022-01-20 16:56:19 +00:00
|
|
|
std::chrono::microseconds gpuHangCheckPeriod{500'000};
|
2018-11-05 11:52:19 +01:00
|
|
|
uint32_t lastSentL3Config = 0;
|
2018-06-12 20:33:03 +02:00
|
|
|
uint32_t latestSentStatelessMocsConfig = 0;
|
2019-08-21 03:50:47 -07:00
|
|
|
uint64_t lastSentSliceCount = QueueSliceCount::defaultSliceCount;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2024-01-23 10:41:31 +00:00
|
|
|
uint32_t requiredScratchSlot0Size = 0;
|
|
|
|
|
uint32_t requiredScratchSlot1Size = 0;
|
2023-11-30 10:36:43 +00:00
|
|
|
uint32_t lastAdditionalKernelExecInfo = AdditionalKernelExecInfo::notSet;
|
|
|
|
|
KernelExecutionType lastKernelExecutionType = KernelExecutionType::defaultType;
|
|
|
|
|
MemoryCompressionState lastMemoryCompressionState = MemoryCompressionState::notApplicable;
|
2021-09-17 13:05:26 +00:00
|
|
|
uint32_t activePartitions = 1;
|
2021-09-23 18:13:37 +00:00
|
|
|
uint32_t activePartitionsConfig = 1;
|
2023-06-06 15:11:09 +00:00
|
|
|
uint32_t immWritePostSyncWriteOffset = 0;
|
|
|
|
|
uint32_t timeStampPostSyncWriteOffset = 0;
|
2022-11-22 13:53:59 +00:00
|
|
|
TaskCountType completionFenceValue = 0;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-10-29 08:01:53 +01:00
|
|
|
const uint32_t rootDeviceIndex;
|
2020-10-29 15:33:35 +01:00
|
|
|
const DeviceBitfield deviceBitfield;
|
2019-10-29 08:01:53 +01:00
|
|
|
|
2018-11-05 11:52:19 +01:00
|
|
|
int8_t lastMediaSamplerConfig = -1;
|
2018-09-13 15:49:38 +02:00
|
|
|
|
2018-11-05 11:52:19 +01:00
|
|
|
bool isPreambleSent = false;
|
|
|
|
|
bool isStateSipSent = false;
|
2020-02-03 10:24:43 +01:00
|
|
|
bool isEnginePrologueSent = false;
|
2020-11-26 19:02:18 +00:00
|
|
|
bool isPerDssBackedBufferSent = false;
|
2023-04-28 09:38:31 +00:00
|
|
|
bool gsbaFor32BitProgrammed = false;
|
|
|
|
|
bool gsbaStateDirty = true;
|
2019-04-26 17:04:03 +02:00
|
|
|
bool bindingTableBaseAddressRequired = false;
|
2023-02-07 17:23:45 +00:00
|
|
|
bool heapStorageRequiresRecyclingTag = false;
|
2018-11-05 11:52:19 +01:00
|
|
|
bool mediaVfeStateDirty = true;
|
2023-03-10 13:20:23 +00:00
|
|
|
bool stateComputeModeDirty = true;
|
2023-03-30 20:03:12 +00:00
|
|
|
bool btdCommandDirty = true;
|
2018-11-05 11:52:19 +01:00
|
|
|
bool lastVmeSubslicesConfig = false;
|
|
|
|
|
bool timestampPacketWriteEnabled = false;
|
2021-02-16 17:04:00 +00:00
|
|
|
bool staticWorkPartitioningEnabled = false;
|
2018-11-05 11:52:19 +01:00
|
|
|
bool nTo1SubmissionModelEnabled = false;
|
2022-08-31 13:26:29 +00:00
|
|
|
bool lastSystolicPipelineSelectMode = false;
|
2019-08-27 19:14:24 +02:00
|
|
|
bool requiresInstructionCacheFlush = false;
|
2019-09-19 21:09:44 +02:00
|
|
|
|
|
|
|
|
bool localMemoryEnabled = false;
|
2019-12-31 10:45:14 +01:00
|
|
|
bool pageTableManagerInitialized = false;
|
2020-09-22 16:29:34 +02:00
|
|
|
|
|
|
|
|
bool useNewResourceImplicitFlush = false;
|
|
|
|
|
bool newResources = false;
|
|
|
|
|
bool useGpuIdleImplicitFlush = false;
|
2021-03-03 12:25:26 +00:00
|
|
|
bool lastSentUseGlobalAtomics = false;
|
2021-06-17 11:55:28 +00:00
|
|
|
bool useNotifyEnableForPostSync = false;
|
2022-10-11 10:37:19 +00:00
|
|
|
bool dcFlushSupport = false;
|
2022-10-26 11:31:37 +00:00
|
|
|
bool forceSkipResourceCleanupRequired = false;
|
2022-11-03 15:25:30 +00:00
|
|
|
volatile bool resourcesInitialized = false;
|
2023-02-22 21:30:40 +00:00
|
|
|
bool doubleSbaWa = false;
|
2023-06-05 13:29:53 +00:00
|
|
|
bool dshSupported = false;
|
2023-11-23 13:58:58 +00:00
|
|
|
bool heaplessModeEnabled = false;
|
2017-12-21 00:45:38 +01:00
|
|
|
};
|
|
|
|
|
|
2020-10-29 15:33:35 +01:00
|
|
|
typedef CommandStreamReceiver *(*CommandStreamReceiverCreateFunc)(bool withAubDump,
|
|
|
|
|
ExecutionEnvironment &executionEnvironment,
|
|
|
|
|
uint32_t rootDeviceIndex,
|
|
|
|
|
const DeviceBitfield deviceBitfield);
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|