summaryrefslogtreecommitdiffstats
path: root/src/video_core/macro
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2023-08-04 03:32:30 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2023-09-23 23:05:29 +0200
commitf1a2e367113518b277f34ffbb04499882c3b6051 (patch)
tree0920a98bd359b9207130d01f6df4ae5135ec805c /src/video_core/macro
parentQuery Cache: Setup Base rework (diff)
downloadyuzu-f1a2e367113518b277f34ffbb04499882c3b6051.tar
yuzu-f1a2e367113518b277f34ffbb04499882c3b6051.tar.gz
yuzu-f1a2e367113518b277f34ffbb04499882c3b6051.tar.bz2
yuzu-f1a2e367113518b277f34ffbb04499882c3b6051.tar.lz
yuzu-f1a2e367113518b277f34ffbb04499882c3b6051.tar.xz
yuzu-f1a2e367113518b277f34ffbb04499882c3b6051.tar.zst
yuzu-f1a2e367113518b277f34ffbb04499882c3b6051.zip
Diffstat (limited to 'src/video_core/macro')
-rw-r--r--src/video_core/macro/macro_hle.cpp24
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:
}
};
+class HLE_DrawIndirectByteCount final : public HLEMacroImpl {
+public:
+ explicit HLE_DrawIndirectByteCount(Maxwell3D& maxwell3d_) : HLEMacroImpl(maxwell3d_) {}
+
+ void Execute(const std::vector<u32>& parameters, [[maybe_unused]] u32 method) override {
+ maxwell3d.RefreshParameters();
+
+ maxwell3d.regs.draw.begin = parameters[0];
+ maxwell3d.regs.draw_auto_stride = parameters[1];
+ maxwell3d.regs.draw_auto_byte_count = parameters[2];
+
+ if (maxwell3d.ShouldExecute()) {
+ maxwell3d.draw_manager->DrawArray(
+ maxwell3d.regs.draw.topology, 0,
+ maxwell3d.regs.draw_auto_byte_count / maxwell3d.regs.draw_auto_stride, 0, 1);
+ }
+ }
+};
+
class HLE_C713C83D8F63CCF3 final : public HLEMacroImpl {
public:
explicit HLE_C713C83D8F63CCF3(Maxwell3D& maxwell3d_) : HLEMacroImpl(maxwell3d_) {}
@@ -536,6 +555,11 @@ HLEMacro::HLEMacro(Maxwell3D& maxwell3d_) : maxwell3d{maxwell3d_} {
[](Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> {
return std::make_unique<HLE_TransformFeedbackSetup>(maxwell3d__);
}));
+ builders.emplace(0xB5F74EDB717278ECULL,
+ std::function<std::unique_ptr<CachedMacro>(Maxwell3D&)>(
+ [](Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> {
+ return std::make_unique<HLE_DrawIndirectByteCount>(maxwell3d__);
+ }));
}
HLEMacro::~HLEMacro() = default;