diff options
author | Ameer J <52414509+ameerj@users.noreply.github.com> | 2023-12-19 22:25:08 +0100 |
---|---|---|
committer | Ameer J <52414509+ameerj@users.noreply.github.com> | 2023-12-20 01:54:57 +0100 |
commit | bbc0ed118df7f64522e198307a6d28607b23d4be (patch) | |
tree | 2dfd7ecaec445de037ec0af719d12991b88379fd /src/video_core/macro | |
parent | Merge pull request #12411 from ameerj/gl-nv-tfb-fixups (diff) | |
download | yuzu-bbc0ed118df7f64522e198307a6d28607b23d4be.tar yuzu-bbc0ed118df7f64522e198307a6d28607b23d4be.tar.gz yuzu-bbc0ed118df7f64522e198307a6d28607b23d4be.tar.bz2 yuzu-bbc0ed118df7f64522e198307a6d28607b23d4be.tar.lz yuzu-bbc0ed118df7f64522e198307a6d28607b23d4be.tar.xz yuzu-bbc0ed118df7f64522e198307a6d28607b23d4be.tar.zst yuzu-bbc0ed118df7f64522e198307a6d28607b23d4be.zip |
Diffstat (limited to 'src/video_core/macro')
-rw-r--r-- | src/video_core/macro/macro_hle.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/macro/macro_hle.cpp b/src/video_core/macro/macro_hle.cpp index 046c8085e..46e853e04 100644 --- a/src/video_core/macro/macro_hle.cpp +++ b/src/video_core/macro/macro_hle.cpp @@ -327,12 +327,13 @@ public: explicit HLE_DrawIndirectByteCount(Maxwell3D& maxwell3d_) : HLEMacroImpl(maxwell3d_) {} void Execute(const std::vector<u32>& parameters, [[maybe_unused]] u32 method) override { + const bool force = maxwell3d.Rasterizer().HasDrawTransformFeedback(); + auto topology = static_cast<Maxwell3D::Regs::PrimitiveTopology>(parameters[0] & 0xFFFFU); - if (!maxwell3d.AnyParametersDirty() || !IsTopologySafe(topology)) { + if (!force && (!maxwell3d.AnyParametersDirty() || !IsTopologySafe(topology))) { Fallback(parameters); return; } - auto& params = maxwell3d.draw_manager->GetIndirectParams(); params.is_byte_count = true; params.is_indexed = false; @@ -503,6 +504,8 @@ public: maxwell3d.CallMethod(static_cast<size_t>(MAXWELL3D_REG_INDEX(launch_dma)), 0x1011, true); maxwell3d.CallMethod(static_cast<size_t>(MAXWELL3D_REG_INDEX(inline_data)), regs.transform_feedback.controls[0].stride, true); + + maxwell3d.Rasterizer().RegisterTransformFeedback(regs.upload.dest.Address()); } }; |