diff options
Diffstat (limited to 'src/video_core/macro')
| -rw-r--r-- | src/video_core/macro/macro_hle.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/video_core/macro/macro_hle.cpp b/src/video_core/macro/macro_hle.cpp index 6272a4652..e980af171 100644 --- a/src/video_core/macro/macro_hle.cpp +++ b/src/video_core/macro/macro_hle.cpp | |||
| @@ -319,6 +319,25 @@ private: | |||
| 319 | } | 319 | } |
| 320 | }; | 320 | }; |
| 321 | 321 | ||
| 322 | class HLE_DrawIndirectByteCount final : public HLEMacroImpl { | ||
| 323 | public: | ||
| 324 | explicit HLE_DrawIndirectByteCount(Maxwell3D& maxwell3d_) : HLEMacroImpl(maxwell3d_) {} | ||
| 325 | |||
| 326 | void Execute(const std::vector<u32>& parameters, [[maybe_unused]] u32 method) override { | ||
| 327 | maxwell3d.RefreshParameters(); | ||
| 328 | |||
| 329 | maxwell3d.regs.draw.begin = parameters[0]; | ||
| 330 | maxwell3d.regs.draw_auto_stride = parameters[1]; | ||
| 331 | maxwell3d.regs.draw_auto_byte_count = parameters[2]; | ||
| 332 | |||
| 333 | if (maxwell3d.ShouldExecute()) { | ||
| 334 | maxwell3d.draw_manager->DrawArray( | ||
| 335 | maxwell3d.regs.draw.topology, 0, | ||
| 336 | maxwell3d.regs.draw_auto_byte_count / maxwell3d.regs.draw_auto_stride, 0, 1); | ||
| 337 | } | ||
| 338 | } | ||
| 339 | }; | ||
| 340 | |||
| 322 | class HLE_C713C83D8F63CCF3 final : public HLEMacroImpl { | 341 | class HLE_C713C83D8F63CCF3 final : public HLEMacroImpl { |
| 323 | public: | 342 | public: |
| 324 | explicit HLE_C713C83D8F63CCF3(Maxwell3D& maxwell3d_) : HLEMacroImpl(maxwell3d_) {} | 343 | explicit HLE_C713C83D8F63CCF3(Maxwell3D& maxwell3d_) : HLEMacroImpl(maxwell3d_) {} |
| @@ -536,6 +555,11 @@ HLEMacro::HLEMacro(Maxwell3D& maxwell3d_) : maxwell3d{maxwell3d_} { | |||
| 536 | [](Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> { | 555 | [](Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> { |
| 537 | return std::make_unique<HLE_TransformFeedbackSetup>(maxwell3d__); | 556 | return std::make_unique<HLE_TransformFeedbackSetup>(maxwell3d__); |
| 538 | })); | 557 | })); |
| 558 | builders.emplace(0xB5F74EDB717278ECULL, | ||
| 559 | std::function<std::unique_ptr<CachedMacro>(Maxwell3D&)>( | ||
| 560 | [](Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> { | ||
| 561 | return std::make_unique<HLE_DrawIndirectByteCount>(maxwell3d__); | ||
| 562 | })); | ||
| 539 | } | 563 | } |
| 540 | 564 | ||
| 541 | HLEMacro::~HLEMacro() = default; | 565 | HLEMacro::~HLEMacro() = default; |