summaryrefslogtreecommitdiff
path: root/src/video_core/macro
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/macro')
-rw-r--r--src/video_core/macro/macro_hle.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/video_core/macro/macro_hle.cpp b/src/video_core/macro/macro_hle.cpp
index 6d35387d9..0f3262edb 100644
--- a/src/video_core/macro/macro_hle.cpp
+++ b/src/video_core/macro/macro_hle.cpp
@@ -130,19 +130,13 @@ void HLE_3F5E74B9C9A50164(Engines::Maxwell3D& maxwell3d, const std::vector<u32>&
130void HLE_EAD26C3E2109B06B(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& parameters) { 130void HLE_EAD26C3E2109B06B(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& parameters) {
131 ASSERT(parameters.size() == 1); 131 ASSERT(parameters.size() == 1);
132 132
133 Engines::Maxwell3D::Regs::ClearSurface clear_params{parameters[0]}; 133 const Engines::Maxwell3D::Regs::ClearSurface clear_params{parameters[0]};
134
135 const u32 rt_index = clear_params.RT; 134 const u32 rt_index = clear_params.RT;
136 const u32 num_layers = maxwell3d.regs.rt[rt_index].depth_volume; 135 const u32 num_layers = maxwell3d.regs.rt[rt_index].depth;
137 136 ASSERT(clear_params.layer == 0);
138 for (u32 i = 0; i < num_layers; i++) {
139 // 0x674 = regs.clear_surface
140 maxwell3d.CallMethod(0x674, clear_params.raw, true);
141 clear_params.layer.Assign(clear_params.layer + 1);
142 137
143 // FIXME: remove this when amdvlk can clear multiple layers without crashing 138 maxwell3d.regs.clear_surface.raw = clear_params.raw;
144 break; 139 maxwell3d.ProcessClearBuffers(num_layers);
145 }
146} 140}
147 141
148constexpr std::array<std::pair<u64, HLEFunction>, 5> hle_funcs{{ 142constexpr std::array<std::pair<u64, HLEFunction>, 5> hle_funcs{{