diff options
| author | 2023-01-05 20:53:31 -0500 | |
|---|---|---|
| committer | 2023-01-05 20:53:31 -0500 | |
| commit | f6245dc40ad3bfa1dffcfdeca9aab8b035a91d61 (patch) | |
| tree | b7227f1daf0c1ca06d2a2c5ab3de9b55d1bad647 /src/video_core/macro | |
| parent | Merge pull request #9528 from liamwhite/mvk-nulldesc (diff) | |
| download | yuzu-f6245dc40ad3bfa1dffcfdeca9aab8b035a91d61.tar.gz yuzu-f6245dc40ad3bfa1dffcfdeca9aab8b035a91d61.tar.xz yuzu-f6245dc40ad3bfa1dffcfdeca9aab8b035a91d61.zip | |
MacroHLE: eliminate 2 rushed macros.
Diffstat (limited to 'src/video_core/macro')
| -rw-r--r-- | src/video_core/macro/macro_hle.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/video_core/macro/macro_hle.cpp b/src/video_core/macro/macro_hle.cpp index a5476e795..6272a4652 100644 --- a/src/video_core/macro/macro_hle.cpp +++ b/src/video_core/macro/macro_hle.cpp | |||
| @@ -50,38 +50,6 @@ protected: | |||
| 50 | Maxwell3D& maxwell3d; | 50 | Maxwell3D& maxwell3d; |
| 51 | }; | 51 | }; |
| 52 | 52 | ||
| 53 | class HLE_DrawArrays final : public HLEMacroImpl { | ||
| 54 | public: | ||
| 55 | explicit HLE_DrawArrays(Maxwell3D& maxwell3d_) : HLEMacroImpl(maxwell3d_) {} | ||
| 56 | |||
| 57 | void Execute(const std::vector<u32>& parameters, [[maybe_unused]] u32 method) override { | ||
| 58 | maxwell3d.RefreshParameters(); | ||
| 59 | |||
| 60 | auto topology = static_cast<Maxwell3D::Regs::PrimitiveTopology>(parameters[0]); | ||
| 61 | maxwell3d.draw_manager->DrawArray(topology, parameters[1], parameters[2], | ||
| 62 | maxwell3d.regs.global_base_instance_index, 1); | ||
| 63 | } | ||
| 64 | }; | ||
| 65 | |||
| 66 | class HLE_DrawIndexed final : public HLEMacroImpl { | ||
| 67 | public: | ||
| 68 | explicit HLE_DrawIndexed(Maxwell3D& maxwell3d_) : HLEMacroImpl(maxwell3d_) {} | ||
| 69 | |||
| 70 | void Execute(const std::vector<u32>& parameters, [[maybe_unused]] u32 method) override { | ||
| 71 | maxwell3d.RefreshParameters(); | ||
| 72 | maxwell3d.regs.index_buffer.start_addr_high = parameters[1]; | ||
| 73 | maxwell3d.regs.index_buffer.start_addr_low = parameters[2]; | ||
| 74 | maxwell3d.regs.index_buffer.format = | ||
| 75 | static_cast<Engines::Maxwell3D::Regs::IndexFormat>(parameters[3]); | ||
| 76 | maxwell3d.dirty.flags[VideoCommon::Dirty::IndexBuffer] = true; | ||
| 77 | |||
| 78 | auto topology = static_cast<Maxwell3D::Regs::PrimitiveTopology>(parameters[0]); | ||
| 79 | maxwell3d.draw_manager->DrawIndex(topology, 0, parameters[4], | ||
| 80 | maxwell3d.regs.global_base_vertex_index, | ||
| 81 | maxwell3d.regs.global_base_instance_index, 1); | ||
| 82 | } | ||
| 83 | }; | ||
| 84 | |||
| 85 | /* | 53 | /* |
| 86 | * @note: these macros have two versions, a normal and extended version, with the extended version | 54 | * @note: these macros have two versions, a normal and extended version, with the extended version |
| 87 | * also assigning the base vertex/instance. | 55 | * also assigning the base vertex/instance. |
| @@ -497,11 +465,6 @@ public: | |||
| 497 | } // Anonymous namespace | 465 | } // Anonymous namespace |
| 498 | 466 | ||
| 499 | HLEMacro::HLEMacro(Maxwell3D& maxwell3d_) : maxwell3d{maxwell3d_} { | 467 | HLEMacro::HLEMacro(Maxwell3D& maxwell3d_) : maxwell3d{maxwell3d_} { |
| 500 | builders.emplace(0xDD6A7FA92A7D2674ULL, | ||
| 501 | std::function<std::unique_ptr<CachedMacro>(Maxwell3D&)>( | ||
| 502 | [](Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> { | ||
| 503 | return std::make_unique<HLE_DrawArrays>(maxwell3d__); | ||
| 504 | })); | ||
| 505 | builders.emplace(0x0D61FC9FAAC9FCADULL, | 468 | builders.emplace(0x0D61FC9FAAC9FCADULL, |
| 506 | std::function<std::unique_ptr<CachedMacro>(Maxwell3D&)>( | 469 | std::function<std::unique_ptr<CachedMacro>(Maxwell3D&)>( |
| 507 | [](Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> { | 470 | [](Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> { |
| @@ -512,11 +475,6 @@ HLEMacro::HLEMacro(Maxwell3D& maxwell3d_) : maxwell3d{maxwell3d_} { | |||
| 512 | [](Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> { | 475 | [](Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> { |
| 513 | return std::make_unique<HLE_DrawArraysIndirect<true>>(maxwell3d__); | 476 | return std::make_unique<HLE_DrawArraysIndirect<true>>(maxwell3d__); |
| 514 | })); | 477 | })); |
| 515 | builders.emplace(0x2DB33AADB741839CULL, | ||
| 516 | std::function<std::unique_ptr<CachedMacro>(Maxwell3D&)>( | ||
| 517 | [](Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> { | ||
| 518 | return std::make_unique<HLE_DrawIndexed>(maxwell3d__); | ||
| 519 | })); | ||
| 520 | builders.emplace(0x771BB18C62444DA0ULL, | 478 | builders.emplace(0x771BB18C62444DA0ULL, |
| 521 | std::function<std::unique_ptr<CachedMacro>(Maxwell3D&)>( | 479 | std::function<std::unique_ptr<CachedMacro>(Maxwell3D&)>( |
| 522 | [](Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> { | 480 | [](Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> { |