1
0
Fork 0
forked from suyu/suyu

video_core: Replace VKFenceManager with FenceManager

This commit is contained in:
german77 2022-06-25 23:32:41 -05:00
parent 7b48e7b363
commit fca5752690
3 changed files with 14 additions and 15 deletions

View file

@ -42,30 +42,30 @@ void InnerFence::Wait() {
scheduler.Wait(wait_tick); scheduler.Wait(wait_tick);
} }
VKFenceManager::VKFenceManager(VideoCore::RasterizerInterface& rasterizer_, Tegra::GPU& gpu_, FenceManager::FenceManager(VideoCore::RasterizerInterface& rasterizer_, Tegra::GPU& gpu_,
TextureCache& texture_cache_, BufferCache& buffer_cache_, TextureCache& texture_cache_, BufferCache& buffer_cache_,
VKQueryCache& query_cache_, const Device& device_, VKQueryCache& query_cache_, const Device& device_,
VKScheduler& scheduler_) VKScheduler& scheduler_)
: GenericFenceManager{rasterizer_, gpu_, texture_cache_, buffer_cache_, query_cache_}, : GenericFenceManager{rasterizer_, gpu_, texture_cache_, buffer_cache_, query_cache_},
scheduler{scheduler_} {} scheduler{scheduler_} {}
Fence VKFenceManager::CreateFence(u32 value, bool is_stubbed) { Fence FenceManager::CreateFence(u32 value, bool is_stubbed) {
return std::make_shared<InnerFence>(scheduler, value, is_stubbed); return std::make_shared<InnerFence>(scheduler, value, is_stubbed);
} }
Fence VKFenceManager::CreateFence(GPUVAddr addr, u32 value, bool is_stubbed) { Fence FenceManager::CreateFence(GPUVAddr addr, u32 value, bool is_stubbed) {
return std::make_shared<InnerFence>(scheduler, addr, value, is_stubbed); return std::make_shared<InnerFence>(scheduler, addr, value, is_stubbed);
} }
void VKFenceManager::QueueFence(Fence& fence) { void FenceManager::QueueFence(Fence& fence) {
fence->Queue(); fence->Queue();
} }
bool VKFenceManager::IsFenceSignaled(Fence& fence) const { bool FenceManager::IsFenceSignaled(Fence& fence) const {
return fence->IsSignaled(); return fence->IsSignaled();
} }
void VKFenceManager::WaitFence(Fence& fence) { void FenceManager::WaitFence(Fence& fence) {
fence->Wait(); fence->Wait();
} }

View file

@ -44,12 +44,11 @@ using Fence = std::shared_ptr<InnerFence>;
using GenericFenceManager = using GenericFenceManager =
VideoCommon::FenceManager<Fence, TextureCache, BufferCache, VKQueryCache>; VideoCommon::FenceManager<Fence, TextureCache, BufferCache, VKQueryCache>;
class VKFenceManager final : public GenericFenceManager { class FenceManager final : public GenericFenceManager {
public: public:
explicit VKFenceManager(VideoCore::RasterizerInterface& rasterizer, Tegra::GPU& gpu, explicit FenceManager(VideoCore::RasterizerInterface& rasterizer, Tegra::GPU& gpu,
TextureCache& texture_cache, BufferCache& buffer_cache, TextureCache& texture_cache, BufferCache& buffer_cache,
VKQueryCache& query_cache, const Device& device, VKQueryCache& query_cache, const Device& device, VKScheduler& scheduler);
VKScheduler& scheduler);
protected: protected:
Fence CreateFence(u32 value, bool is_stubbed) override; Fence CreateFence(u32 value, bool is_stubbed) override;

View file

@ -158,7 +158,7 @@ private:
PipelineCache pipeline_cache; PipelineCache pipeline_cache;
VKQueryCache query_cache; VKQueryCache query_cache;
AccelerateDMA accelerate_dma; AccelerateDMA accelerate_dma;
VKFenceManager fence_manager; FenceManager fence_manager;
vk::Event wfi_event; vk::Event wfi_event;