diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-07 17:15:28 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-10-06 21:00:51 +0200 |
commit | d7990c159e956e5431c501fa94405dd04496197c (patch) | |
tree | b0eab4e9b1fd5c92e6918a732b3eda8443ba4b9e /src/video_core/renderer_vulkan | |
parent | NVHOST_CTRl: Implement missing method and fix some stuffs. (diff) | |
download | yuzu-d7990c159e956e5431c501fa94405dd04496197c.tar yuzu-d7990c159e956e5431c501fa94405dd04496197c.tar.gz yuzu-d7990c159e956e5431c501fa94405dd04496197c.tar.bz2 yuzu-d7990c159e956e5431c501fa94405dd04496197c.tar.lz yuzu-d7990c159e956e5431c501fa94405dd04496197c.tar.xz yuzu-d7990c159e956e5431c501fa94405dd04496197c.tar.zst yuzu-d7990c159e956e5431c501fa94405dd04496197c.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan')
4 files changed, 10 insertions, 6 deletions
diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 68c2bc34c..d12669c9d 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -106,7 +106,7 @@ RendererVulkan::RendererVulkan(Core::TelemetrySession& telemetry_session_, surface(CreateSurface(instance, render_window)), device(CreateDevice(instance, dld, *surface)), memory_allocator(device, false), - state_tracker(gpu), + state_tracker(), scheduler(device, state_tracker), swapchain(*surface, device, scheduler, render_window.GetFramebufferLayout().width, render_window.GetFramebufferLayout().height, false), diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 5d9ff0589..bf750452f 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -995,7 +995,7 @@ void RasterizerVulkan::BindChannel(Tegra::Control::ChannelState& channel) { pipeline_cache.BindToChannel(channel_id); query_cache.BindToChannel(channel_id); state_tracker.ChangeChannel(channel); - scheduler.InvalidateState(); + state_tracker.InvalidateState(); } void RasterizerVulkan::ReleaseChannel(s32 channel_id) { diff --git a/src/video_core/renderer_vulkan/vk_state_tracker.cpp b/src/video_core/renderer_vulkan/vk_state_tracker.cpp index a87bf8dd3..5a11d3267 100644 --- a/src/video_core/renderer_vulkan/vk_state_tracker.cpp +++ b/src/video_core/renderer_vulkan/vk_state_tracker.cpp @@ -10,7 +10,6 @@ #include "video_core/control/channel_state.h" #include "video_core/dirty_flags.h" #include "video_core/engines/maxwell_3d.h" -#include "video_core/gpu.h" #include "video_core/renderer_vulkan/vk_state_tracker.h" #define OFF(field_name) MAXWELL3D_REG_INDEX(field_name) @@ -203,7 +202,10 @@ void StateTracker::ChangeChannel(Tegra::Control::ChannelState& channel_state) { flags = &channel_state.maxwell_3d->dirty.flags; } -StateTracker::StateTracker(Tegra::GPU& gpu) - : flags{}, invalidation_flags{MakeInvalidationFlags()} {} +void StateTracker::InvalidateState() { + flags->set(); +} + +StateTracker::StateTracker() : flags{}, invalidation_flags{MakeInvalidationFlags()} {} } // namespace Vulkan diff --git a/src/video_core/renderer_vulkan/vk_state_tracker.h b/src/video_core/renderer_vulkan/vk_state_tracker.h index 9f8a887f9..c107d9c24 100644 --- a/src/video_core/renderer_vulkan/vk_state_tracker.h +++ b/src/video_core/renderer_vulkan/vk_state_tracker.h @@ -59,7 +59,7 @@ class StateTracker { using Maxwell = Tegra::Engines::Maxwell3D::Regs; public: - explicit StateTracker(Tegra::GPU& gpu); + explicit StateTracker(); void InvalidateCommandBufferState() { (*flags) |= invalidation_flags; @@ -149,6 +149,8 @@ public: void ChangeChannel(Tegra::Control::ChannelState& channel_state); + void InvalidateState(); + private: static constexpr auto INVALID_TOPOLOGY = static_cast<Maxwell::PrimitiveTopology>(~0u); |