diff options
| author | 2018-09-04 13:54:50 +0200 | |
|---|---|---|
| committer | 2018-09-04 14:10:05 +0200 | |
| commit | 2081ed7db22d62b82acfddcd4b7c10a03bb3daaf (patch) | |
| tree | 70d38dd3466dee6e9cd05ab83cedb7deb375a5af /src/video_core/gpu.h | |
| parent | Merge pull request #1231 from lioncash/global (diff) | |
| download | yuzu-2081ed7db22d62b82acfddcd4b7c10a03bb3daaf.tar.gz yuzu-2081ed7db22d62b82acfddcd4b7c10a03bb3daaf.tar.xz yuzu-2081ed7db22d62b82acfddcd4b7c10a03bb3daaf.zip | |
command_processor: Use std::array for bound_engines.
subchannel is a 3 bit field. So there must not be more than 8 bound engines.
And using a hashmap for up to 8 values is a bit overpowered.
Diffstat (limited to 'src/video_core/gpu.h')
| -rw-r--r-- | src/video_core/gpu.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index 2c3dbd97b..d29f31f52 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <array> | ||
| 7 | #include <memory> | 8 | #include <memory> |
| 8 | #include <unordered_map> | ||
| 9 | #include "common/common_types.h" | 9 | #include "common/common_types.h" |
| 10 | #include "core/hle/service/nvflinger/buffer_queue.h" | 10 | #include "core/hle/service/nvflinger/buffer_queue.h" |
| 11 | #include "video_core/memory_manager.h" | 11 | #include "video_core/memory_manager.h" |
| @@ -136,7 +136,7 @@ private: | |||
| 136 | std::unique_ptr<Tegra::MemoryManager> memory_manager; | 136 | std::unique_ptr<Tegra::MemoryManager> memory_manager; |
| 137 | 137 | ||
| 138 | /// Mapping of command subchannels to their bound engine ids. | 138 | /// Mapping of command subchannels to their bound engine ids. |
| 139 | std::unordered_map<u32, EngineID> bound_engines; | 139 | std::array<EngineID, 8> bound_engines = {}; |
| 140 | 140 | ||
| 141 | /// 3D engine | 141 | /// 3D engine |
| 142 | std::unique_ptr<Engines::Maxwell3D> maxwell_3d; | 142 | std::unique_ptr<Engines::Maxwell3D> maxwell_3d; |