diff options
| author | Fernando S <fsahmkow27@gmail.com> | 2022-12-24 20:26:06 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-24 20:26:06 -0500 |
| commit | 3e6850f00bdd541202a8369438bda7988c8001f5 (patch) | |
| tree | 34691ecb826bc402f68a075de07f4f6aaebf8c44 /src/video_core/dma_pusher.h | |
| parent | c86e21abe422c3b424f4853e497932cdff5778e0 (diff) | |
| parent | c6590ad07b384762fd90ee8852796ec681a69286 (diff) | |
Merge pull request #9453 from ameerj/scratch-vector
common: Add ScratchBuffer Class
Diffstat (limited to 'src/video_core/dma_pusher.h')
| -rw-r--r-- | src/video_core/dma_pusher.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/dma_pusher.h b/src/video_core/dma_pusher.h index 938f0f11c..6f00de937 100644 --- a/src/video_core/dma_pusher.h +++ b/src/video_core/dma_pusher.h @@ -4,11 +4,13 @@ #pragma once #include <array> +#include <span> #include <vector> #include <queue> #include "common/bit_field.h" #include "common/common_types.h" +#include "common/scratch_buffer.h" #include "video_core/engines/engine_interface.h" #include "video_core/engines/puller.h" @@ -136,13 +138,15 @@ private: static constexpr u32 non_puller_methods = 0x40; static constexpr u32 max_subchannels = 8; bool Step(); + void ProcessCommands(std::span<const CommandHeader> commands); void SetState(const CommandHeader& command_header); void CallMethod(u32 argument) const; void CallMultiMethod(const u32* base_start, u32 num_methods) const; - std::vector<CommandHeader> command_headers; ///< Buffer for list of commands fetched at once + Common::ScratchBuffer<CommandHeader> + command_headers; ///< Buffer for list of commands fetched at once std::queue<CommandList> dma_pushbuffer; ///< Queue of command lists to be processed std::size_t dma_pushbuffer_subindex{}; ///< Index within a command list within the pushbuffer @@ -159,7 +163,7 @@ private: DmaState dma_state{}; bool dma_increment_once{}; - bool ib_enable{true}; ///< IB mode enabled + const bool ib_enable{true}; ///< IB mode enabled std::array<Engines::EngineInterface*, max_subchannels> subchannels{}; |
