diff options
| author | 2022-11-19 01:46:48 -0800 | |
|---|---|---|
| committer | 2022-11-19 01:46:48 -0800 | |
| commit | 4975f60162184be7549f24b6a42b371ee9de83a2 (patch) | |
| tree | a56bc8aeaad9a439ce166626bc210f164b6611de /src/video_core/macro | |
| parent | Merge pull request #9253 from vonchenplus/attr_layer (diff) | |
| parent | maxwell3d: full HLE for multi-layer clears (diff) | |
| download | yuzu-4975f60162184be7549f24b6a42b371ee9de83a2.tar.gz yuzu-4975f60162184be7549f24b6a42b371ee9de83a2.tar.xz yuzu-4975f60162184be7549f24b6a42b371ee9de83a2.zip | |
Merge pull request #9252 from liamwhite/radv-superiority
maxwell3d: HLE multi-layer clear macro
Diffstat (limited to 'src/video_core/macro')
| -rw-r--r-- | src/video_core/macro/macro_hle.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/video_core/macro/macro_hle.cpp b/src/video_core/macro/macro_hle.cpp index f896591bf..0f3262edb 100644 --- a/src/video_core/macro/macro_hle.cpp +++ b/src/video_core/macro/macro_hle.cpp | |||
| @@ -126,11 +126,25 @@ void HLE_3F5E74B9C9A50164(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& | |||
| 126 | } | 126 | } |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | constexpr std::array<std::pair<u64, HLEFunction>, 4> hle_funcs{{ | 129 | // Multi-layer Clear |
| 130 | void HLE_EAD26C3E2109B06B(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& parameters) { | ||
| 131 | ASSERT(parameters.size() == 1); | ||
| 132 | |||
| 133 | const Engines::Maxwell3D::Regs::ClearSurface clear_params{parameters[0]}; | ||
| 134 | const u32 rt_index = clear_params.RT; | ||
| 135 | const u32 num_layers = maxwell3d.regs.rt[rt_index].depth; | ||
| 136 | ASSERT(clear_params.layer == 0); | ||
| 137 | |||
| 138 | maxwell3d.regs.clear_surface.raw = clear_params.raw; | ||
| 139 | maxwell3d.ProcessClearBuffers(num_layers); | ||
| 140 | } | ||
| 141 | |||
| 142 | constexpr std::array<std::pair<u64, HLEFunction>, 5> hle_funcs{{ | ||
| 130 | {0x771BB18C62444DA0, &HLE_771BB18C62444DA0}, | 143 | {0x771BB18C62444DA0, &HLE_771BB18C62444DA0}, |
| 131 | {0x0D61FC9FAAC9FCAD, &HLE_0D61FC9FAAC9FCAD}, | 144 | {0x0D61FC9FAAC9FCAD, &HLE_0D61FC9FAAC9FCAD}, |
| 132 | {0x0217920100488FF7, &HLE_0217920100488FF7}, | 145 | {0x0217920100488FF7, &HLE_0217920100488FF7}, |
| 133 | {0x3F5E74B9C9A50164, &HLE_3F5E74B9C9A50164}, | 146 | {0x3F5E74B9C9A50164, &HLE_3F5E74B9C9A50164}, |
| 147 | {0xEAD26C3E2109B06B, &HLE_EAD26C3E2109B06B}, | ||
| 134 | }}; | 148 | }}; |
| 135 | 149 | ||
| 136 | class HLEMacroImpl final : public CachedMacro { | 150 | class HLEMacroImpl final : public CachedMacro { |