diff options
| author | 2019-11-28 02:15:34 -0300 | |
|---|---|---|
| committer | 2020-02-14 17:38:27 -0300 | |
| commit | 73d2d3342dc8867d32f08f89b2ca36ff071598dc (patch) | |
| tree | 3a032d4a36d0f07981eeb8b396472670bfd11e5a /src/video_core/engines | |
| parent | gl_query_cache: Implement host queries using a deferred cache (diff) | |
| download | yuzu-73d2d3342dc8867d32f08f89b2ca36ff071598dc.tar.gz yuzu-73d2d3342dc8867d32f08f89b2ca36ff071598dc.tar.xz yuzu-73d2d3342dc8867d32f08f89b2ca36ff071598dc.zip | |
gl_query_cache: Optimize query cache
Use a custom cache instead of relying on a ranged cache.
Diffstat (limited to 'src/video_core/engines')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 9add2bc94..842cdcbcf 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #include <cinttypes> | 5 | #include <cinttypes> |
| 6 | #include <cstring> | 6 | #include <cstring> |
| 7 | #include <optional> | ||
| 7 | #include "common/assert.h" | 8 | #include "common/assert.h" |
| 8 | #include "core/core.h" | 9 | #include "core/core.h" |
| 9 | #include "core/core_timing.h" | 10 | #include "core/core_timing.h" |
| @@ -16,6 +17,8 @@ | |||
| 16 | 17 | ||
| 17 | namespace Tegra::Engines { | 18 | namespace Tegra::Engines { |
| 18 | 19 | ||
| 20 | using VideoCore::QueryType; | ||
| 21 | |||
| 19 | /// First register id that is actually a Macro call. | 22 | /// First register id that is actually a Macro call. |
| 20 | constexpr u32 MacroRegistersStart = 0xE00; | 23 | constexpr u32 MacroRegistersStart = 0xE00; |
| 21 | 24 | ||
| @@ -614,10 +617,11 @@ void Maxwell3D::ProcessQueryCondition() { | |||
| 614 | void Maxwell3D::ProcessCounterReset() { | 617 | void Maxwell3D::ProcessCounterReset() { |
| 615 | switch (regs.counter_reset) { | 618 | switch (regs.counter_reset) { |
| 616 | case Regs::CounterReset::SampleCnt: | 619 | case Regs::CounterReset::SampleCnt: |
| 617 | rasterizer.ResetCounter(VideoCore::QueryType::SamplesPassed); | 620 | rasterizer.ResetCounter(QueryType::SamplesPassed); |
| 618 | break; | 621 | break; |
| 619 | default: | 622 | default: |
| 620 | UNIMPLEMENTED_MSG("counter_reset={}", static_cast<u32>(regs.counter_reset)); | 623 | LOG_WARNING(Render_OpenGL, "Unimplemented counter reset={}", |
| 624 | static_cast<int>(regs.counter_reset)); | ||
| 621 | break; | 625 | break; |
| 622 | } | 626 | } |
| 623 | } | 627 | } |
| @@ -670,7 +674,8 @@ std::optional<u64> Maxwell3D::GetQueryResult() { | |||
| 670 | return 0; | 674 | return 0; |
| 671 | case Regs::QuerySelect::SamplesPassed: | 675 | case Regs::QuerySelect::SamplesPassed: |
| 672 | // Deferred. | 676 | // Deferred. |
| 673 | rasterizer.Query(regs.query.QueryAddress(), VideoCore::QueryType::SamplesPassed); | 677 | rasterizer.Query(regs.query.QueryAddress(), VideoCore::QueryType::SamplesPassed, |
| 678 | system.GPU().GetTicks()); | ||
| 674 | return {}; | 679 | return {}; |
| 675 | default: | 680 | default: |
| 676 | UNIMPLEMENTED_MSG("Unimplemented query select type {}", | 681 | UNIMPLEMENTED_MSG("Unimplemented query select type {}", |