diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-06-24 09:01:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-24 09:01:00 -0400 |
| commit | 32343d820d4551153c76e76a3e310e4e3db692e7 (patch) | |
| tree | e74fa2ee58d499c4beed826732a8b4574b9c2a03 /src/video_core/macro/macro_hle.h | |
| parent | b66ccaa37615352a5a8b97e20ce6e6751d136b18 (diff) | |
| parent | f5e2aec4220ee2b72ec2986e0e60625897b2fd44 (diff) | |
Merge pull request #4046 from ogniK5377/macro-hle-prod
Add support for HLEing Macros
Diffstat (limited to 'src/video_core/macro/macro_hle.h')
| -rw-r--r-- | src/video_core/macro/macro_hle.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/video_core/macro/macro_hle.h b/src/video_core/macro/macro_hle.h new file mode 100644 index 000000000..37af875a0 --- /dev/null +++ b/src/video_core/macro/macro_hle.h @@ -0,0 +1,44 @@ +// Copyright 2020 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <memory> +#include <optional> +#include <vector> +#include "common/common_types.h" +#include "video_core/macro/macro.h" + +namespace Tegra { + +namespace Engines { +class Maxwell3D; +} + +using HLEFunction = void (*)(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& parameters); + +class HLEMacro { +public: + explicit HLEMacro(Engines::Maxwell3D& maxwell3d); + ~HLEMacro(); + + std::optional<std::unique_ptr<CachedMacro>> GetHLEProgram(u64 hash) const; + +private: + Engines::Maxwell3D& maxwell3d; +}; + +class HLEMacroImpl : public CachedMacro { +public: + explicit HLEMacroImpl(Engines::Maxwell3D& maxwell3d, HLEFunction func); + ~HLEMacroImpl(); + + void Execute(const std::vector<u32>& parameters, u32 method) override; + +private: + Engines::Maxwell3D& maxwell3d; + HLEFunction func; +}; + +} // namespace Tegra |
