From c34a95fa25effc4e3967d9d2b1909af2d9c6975e Mon Sep 17 00:00:00 2001 From: german77 Date: Sat, 25 Jun 2022 23:51:37 -0500 Subject: [PATCH] video_core: Replace VKUpdateDescriptorQueue with UpdateDescriptorQueue --- src/video_core/renderer_vulkan/pipeline_helper.h | 2 +- src/video_core/renderer_vulkan/vk_buffer_cache.cpp | 2 +- src/video_core/renderer_vulkan/vk_buffer_cache.h | 4 ++-- src/video_core/renderer_vulkan/vk_compute_pass.cpp | 6 +++--- src/video_core/renderer_vulkan/vk_compute_pass.h | 14 +++++++------- .../renderer_vulkan/vk_compute_pipeline.cpp | 2 +- .../renderer_vulkan/vk_compute_pipeline.h | 4 ++-- .../renderer_vulkan/vk_graphics_pipeline.cpp | 2 +- .../renderer_vulkan/vk_graphics_pipeline.h | 6 +++--- .../renderer_vulkan/vk_pipeline_cache.cpp | 2 +- src/video_core/renderer_vulkan/vk_pipeline_cache.h | 6 +++--- src/video_core/renderer_vulkan/vk_rasterizer.h | 2 +- .../renderer_vulkan/vk_update_descriptor.cpp | 8 ++++---- .../renderer_vulkan/vk_update_descriptor.h | 6 +++--- 14 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/video_core/renderer_vulkan/pipeline_helper.h b/src/video_core/renderer_vulkan/pipeline_helper.h index 9d676612ce..b24f3424a6 100644 --- a/src/video_core/renderer_vulkan/pipeline_helper.h +++ b/src/video_core/renderer_vulkan/pipeline_helper.h @@ -168,7 +168,7 @@ private: }; inline void PushImageDescriptors(TextureCache& texture_cache, - VKUpdateDescriptorQueue& update_descriptor_queue, + UpdateDescriptorQueue& update_descriptor_queue, const Shader::Info& info, RescalingPushConstant& rescaling, const VkSampler*& samplers, const VideoCommon::ImageViewInOut*& views) { diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index 2e7f3e5952..558b8db56b 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -125,7 +125,7 @@ VkBufferView Buffer::View(u32 offset, u32 size, VideoCore::Surface::PixelFormat BufferCacheRuntime::BufferCacheRuntime(const Device& device_, MemoryAllocator& memory_allocator_, Scheduler& scheduler_, StagingBufferPool& staging_pool_, - VKUpdateDescriptorQueue& update_descriptor_queue_, + UpdateDescriptorQueue& update_descriptor_queue_, DescriptorPool& descriptor_pool) : device{device_}, memory_allocator{memory_allocator_}, scheduler{scheduler_}, staging_pool{staging_pool_}, update_descriptor_queue{update_descriptor_queue_}, diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.h b/src/video_core/renderer_vulkan/vk_buffer_cache.h index a1e56940e6..a15c8b39ba 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.h +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.h @@ -59,7 +59,7 @@ class BufferCacheRuntime { public: explicit BufferCacheRuntime(const Device& device_, MemoryAllocator& memory_manager_, Scheduler& scheduler_, StagingBufferPool& staging_pool_, - VKUpdateDescriptorQueue& update_descriptor_queue_, + UpdateDescriptorQueue& update_descriptor_queue_, DescriptorPool& descriptor_pool); void Finish(); @@ -126,7 +126,7 @@ private: MemoryAllocator& memory_allocator; Scheduler& scheduler; StagingBufferPool& staging_pool; - VKUpdateDescriptorQueue& update_descriptor_queue; + UpdateDescriptorQueue& update_descriptor_queue; vk::Buffer quad_array_lut; MemoryCommit quad_array_lut_commit; diff --git a/src/video_core/renderer_vulkan/vk_compute_pass.cpp b/src/video_core/renderer_vulkan/vk_compute_pass.cpp index 22a6cf3165..f17a5ccd6e 100644 --- a/src/video_core/renderer_vulkan/vk_compute_pass.cpp +++ b/src/video_core/renderer_vulkan/vk_compute_pass.cpp @@ -202,7 +202,7 @@ ComputePass::~ComputePass() = default; Uint8Pass::Uint8Pass(const Device& device_, Scheduler& scheduler_, DescriptorPool& descriptor_pool, StagingBufferPool& staging_buffer_pool_, - VKUpdateDescriptorQueue& update_descriptor_queue_) + UpdateDescriptorQueue& update_descriptor_queue_) : ComputePass(device_, descriptor_pool, INPUT_OUTPUT_DESCRIPTOR_SET_BINDINGS, INPUT_OUTPUT_DESCRIPTOR_UPDATE_TEMPLATE, INPUT_OUTPUT_BANK_INFO, {}, VULKAN_UINT8_COMP_SPV), @@ -244,7 +244,7 @@ std::pair Uint8Pass::Assemble(u32 num_vertices, VkBuffer QuadIndexedPass::QuadIndexedPass(const Device& device_, Scheduler& scheduler_, DescriptorPool& descriptor_pool_, StagingBufferPool& staging_buffer_pool_, - VKUpdateDescriptorQueue& update_descriptor_queue_) + UpdateDescriptorQueue& update_descriptor_queue_) : ComputePass(device_, descriptor_pool_, INPUT_OUTPUT_DESCRIPTOR_SET_BINDINGS, INPUT_OUTPUT_DESCRIPTOR_UPDATE_TEMPLATE, INPUT_OUTPUT_BANK_INFO, COMPUTE_PUSH_CONSTANT_RANGE, VULKAN_QUAD_INDEXED_COMP_SPV), @@ -306,7 +306,7 @@ std::pair QuadIndexedPass::Assemble( ASTCDecoderPass::ASTCDecoderPass(const Device& device_, Scheduler& scheduler_, DescriptorPool& descriptor_pool_, StagingBufferPool& staging_buffer_pool_, - VKUpdateDescriptorQueue& update_descriptor_queue_, + UpdateDescriptorQueue& update_descriptor_queue_, MemoryAllocator& memory_allocator_) : ComputePass(device_, descriptor_pool_, ASTC_DESCRIPTOR_SET_BINDINGS, ASTC_PASS_DESCRIPTOR_UPDATE_TEMPLATE_ENTRY, ASTC_BANK_INFO, diff --git a/src/video_core/renderer_vulkan/vk_compute_pass.h b/src/video_core/renderer_vulkan/vk_compute_pass.h index 930c45496d..dcc691a8ea 100644 --- a/src/video_core/renderer_vulkan/vk_compute_pass.h +++ b/src/video_core/renderer_vulkan/vk_compute_pass.h @@ -21,7 +21,7 @@ namespace Vulkan { class Device; class StagingBufferPool; class Scheduler; -class VKUpdateDescriptorQueue; +class UpdateDescriptorQueue; class Image; struct StagingBufferRef; @@ -50,7 +50,7 @@ class Uint8Pass final : public ComputePass { public: explicit Uint8Pass(const Device& device_, Scheduler& scheduler_, DescriptorPool& descriptor_pool_, StagingBufferPool& staging_buffer_pool_, - VKUpdateDescriptorQueue& update_descriptor_queue_); + UpdateDescriptorQueue& update_descriptor_queue_); ~Uint8Pass(); /// Assemble uint8 indices into an uint16 index buffer @@ -61,7 +61,7 @@ public: private: Scheduler& scheduler; StagingBufferPool& staging_buffer_pool; - VKUpdateDescriptorQueue& update_descriptor_queue; + UpdateDescriptorQueue& update_descriptor_queue; }; class QuadIndexedPass final : public ComputePass { @@ -69,7 +69,7 @@ public: explicit QuadIndexedPass(const Device& device_, Scheduler& scheduler_, DescriptorPool& descriptor_pool_, StagingBufferPool& staging_buffer_pool_, - VKUpdateDescriptorQueue& update_descriptor_queue_); + UpdateDescriptorQueue& update_descriptor_queue_); ~QuadIndexedPass(); std::pair Assemble( @@ -79,7 +79,7 @@ public: private: Scheduler& scheduler; StagingBufferPool& staging_buffer_pool; - VKUpdateDescriptorQueue& update_descriptor_queue; + UpdateDescriptorQueue& update_descriptor_queue; }; class ASTCDecoderPass final : public ComputePass { @@ -87,7 +87,7 @@ public: explicit ASTCDecoderPass(const Device& device_, Scheduler& scheduler_, DescriptorPool& descriptor_pool_, StagingBufferPool& staging_buffer_pool_, - VKUpdateDescriptorQueue& update_descriptor_queue_, + UpdateDescriptorQueue& update_descriptor_queue_, MemoryAllocator& memory_allocator_); ~ASTCDecoderPass(); @@ -97,7 +97,7 @@ public: private: Scheduler& scheduler; StagingBufferPool& staging_buffer_pool; - VKUpdateDescriptorQueue& update_descriptor_queue; + UpdateDescriptorQueue& update_descriptor_queue; MemoryAllocator& memory_allocator; }; diff --git a/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp b/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp index c9e551231f..6447210e27 100644 --- a/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp @@ -25,7 +25,7 @@ using Shader::Backend::SPIRV::RESCALING_LAYOUT_WORDS_OFFSET; using Tegra::Texture::TexturePair; ComputePipeline::ComputePipeline(const Device& device_, DescriptorPool& descriptor_pool, - VKUpdateDescriptorQueue& update_descriptor_queue_, + UpdateDescriptorQueue& update_descriptor_queue_, Common::ThreadWorker* thread_worker, PipelineStatistics* pipeline_statistics, VideoCore::ShaderNotify* shader_notify, const Shader::Info& info_, diff --git a/src/video_core/renderer_vulkan/vk_compute_pipeline.h b/src/video_core/renderer_vulkan/vk_compute_pipeline.h index 3f9cb6b9ff..9879735feb 100644 --- a/src/video_core/renderer_vulkan/vk_compute_pipeline.h +++ b/src/video_core/renderer_vulkan/vk_compute_pipeline.h @@ -29,7 +29,7 @@ class Scheduler; class ComputePipeline { public: explicit ComputePipeline(const Device& device, DescriptorPool& descriptor_pool, - VKUpdateDescriptorQueue& update_descriptor_queue, + UpdateDescriptorQueue& update_descriptor_queue, Common::ThreadWorker* thread_worker, PipelineStatistics* pipeline_statistics, VideoCore::ShaderNotify* shader_notify, const Shader::Info& info, @@ -46,7 +46,7 @@ public: private: const Device& device; - VKUpdateDescriptorQueue& update_descriptor_queue; + UpdateDescriptorQueue& update_descriptor_queue; Shader::Info info; VideoCommon::ComputeUniformBufferSizes uniform_buffer_sizes{}; diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index e2c51fe6f2..682f053351 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -218,7 +218,7 @@ GraphicsPipeline::GraphicsPipeline( Tegra::Engines::Maxwell3D& maxwell3d_, Tegra::MemoryManager& gpu_memory_, Scheduler& scheduler_, BufferCache& buffer_cache_, TextureCache& texture_cache_, VideoCore::ShaderNotify* shader_notify, const Device& device_, DescriptorPool& descriptor_pool, - VKUpdateDescriptorQueue& update_descriptor_queue_, Common::ThreadWorker* worker_thread, + UpdateDescriptorQueue& update_descriptor_queue_, Common::ThreadWorker* worker_thread, PipelineStatistics* pipeline_statistics, RenderPassCache& render_pass_cache, const GraphicsPipelineCacheKey& key_, std::array stages, const std::array& infos) diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.h b/src/video_core/renderer_vulkan/vk_graphics_pipeline.h index 79746c638e..e8949a9ab0 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.h +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.h @@ -63,7 +63,7 @@ class PipelineStatistics; class RenderPassCache; class RescalingPushConstant; class Scheduler; -class VKUpdateDescriptorQueue; +class UpdateDescriptorQueue; class GraphicsPipeline { static constexpr size_t NUM_STAGES = Tegra::Engines::Maxwell3D::Regs::MaxShaderStage; @@ -73,7 +73,7 @@ public: Tegra::Engines::Maxwell3D& maxwell3d, Tegra::MemoryManager& gpu_memory, Scheduler& scheduler, BufferCache& buffer_cache, TextureCache& texture_cache, VideoCore::ShaderNotify* shader_notify, const Device& device, - DescriptorPool& descriptor_pool, VKUpdateDescriptorQueue& update_descriptor_queue, + DescriptorPool& descriptor_pool, UpdateDescriptorQueue& update_descriptor_queue, Common::ThreadWorker* worker_thread, PipelineStatistics* pipeline_statistics, RenderPassCache& render_pass_cache, const GraphicsPipelineCacheKey& key, std::array stages, @@ -126,7 +126,7 @@ private: TextureCache& texture_cache; BufferCache& buffer_cache; Scheduler& scheduler; - VKUpdateDescriptorQueue& update_descriptor_queue; + UpdateDescriptorQueue& update_descriptor_queue; void (*configure_func)(GraphicsPipeline*, bool){}; diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index b5966be13f..09e035799a 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -263,7 +263,7 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, Tegra::Engines::Maxw Tegra::Engines::KeplerCompute& kepler_compute_, Tegra::MemoryManager& gpu_memory_, const Device& device_, Scheduler& scheduler_, DescriptorPool& descriptor_pool_, - VKUpdateDescriptorQueue& update_descriptor_queue_, + UpdateDescriptorQueue& update_descriptor_queue_, RenderPassCache& render_pass_cache_, BufferCache& buffer_cache_, TextureCache& texture_cache_, VideoCore::ShaderNotify& shader_notify_) : VideoCommon::ShaderCache{rasterizer_, gpu_memory_, maxwell3d_, kepler_compute_}, diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.h b/src/video_core/renderer_vulkan/vk_pipeline_cache.h index 9e0f8bb0eb..127957dbf5 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.h +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.h @@ -82,7 +82,7 @@ class PipelineStatistics; class RasterizerVulkan; class RenderPassCache; class Scheduler; -class VKUpdateDescriptorQueue; +class UpdateDescriptorQueue; using VideoCommon::ShaderInfo; @@ -104,7 +104,7 @@ public: Tegra::Engines::KeplerCompute& kepler_compute, Tegra::MemoryManager& gpu_memory, const Device& device, Scheduler& scheduler, DescriptorPool& descriptor_pool, - VKUpdateDescriptorQueue& update_descriptor_queue, + UpdateDescriptorQueue& update_descriptor_queue, RenderPassCache& render_pass_cache, BufferCache& buffer_cache, TextureCache& texture_cache, VideoCore::ShaderNotify& shader_notify_); ~PipelineCache(); @@ -140,7 +140,7 @@ private: const Device& device; Scheduler& scheduler; DescriptorPool& descriptor_pool; - VKUpdateDescriptorQueue& update_descriptor_queue; + UpdateDescriptorQueue& update_descriptor_queue; RenderPassCache& render_pass_cache; BufferCache& buffer_cache; TextureCache& texture_cache; diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.h b/src/video_core/renderer_vulkan/vk_rasterizer.h index 29faaac500..0370ea39be 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.h +++ b/src/video_core/renderer_vulkan/vk_rasterizer.h @@ -146,7 +146,7 @@ private: StagingBufferPool staging_pool; DescriptorPool descriptor_pool; - VKUpdateDescriptorQueue update_descriptor_queue; + UpdateDescriptorQueue update_descriptor_queue; BlitImageHelper blit_image; ASTCDecoderPass astc_decoder_pass; RenderPassCache render_pass_cache; diff --git a/src/video_core/renderer_vulkan/vk_update_descriptor.cpp b/src/video_core/renderer_vulkan/vk_update_descriptor.cpp index 739ed7256e..4d4a6753b7 100644 --- a/src/video_core/renderer_vulkan/vk_update_descriptor.cpp +++ b/src/video_core/renderer_vulkan/vk_update_descriptor.cpp @@ -12,18 +12,18 @@ namespace Vulkan { -VKUpdateDescriptorQueue::VKUpdateDescriptorQueue(const Device& device_, Scheduler& scheduler_) +UpdateDescriptorQueue::UpdateDescriptorQueue(const Device& device_, Scheduler& scheduler_) : device{device_}, scheduler{scheduler_} { payload_cursor = payload.data(); } -VKUpdateDescriptorQueue::~VKUpdateDescriptorQueue() = default; +UpdateDescriptorQueue::~UpdateDescriptorQueue() = default; -void VKUpdateDescriptorQueue::TickFrame() { +void UpdateDescriptorQueue::TickFrame() { payload_cursor = payload.data(); } -void VKUpdateDescriptorQueue::Acquire() { +void UpdateDescriptorQueue::Acquire() { // Minimum number of entries required. // This is the maximum number of entries a single draw call migth use. static constexpr size_t MIN_ENTRIES = 0x400; diff --git a/src/video_core/renderer_vulkan/vk_update_descriptor.h b/src/video_core/renderer_vulkan/vk_update_descriptor.h index 88b82b0cb0..625bcc8091 100644 --- a/src/video_core/renderer_vulkan/vk_update_descriptor.h +++ b/src/video_core/renderer_vulkan/vk_update_descriptor.h @@ -28,10 +28,10 @@ struct DescriptorUpdateEntry { }; }; -class VKUpdateDescriptorQueue final { +class UpdateDescriptorQueue final { public: - explicit VKUpdateDescriptorQueue(const Device& device_, Scheduler& scheduler_); - ~VKUpdateDescriptorQueue(); + explicit UpdateDescriptorQueue(const Device& device_, Scheduler& scheduler_); + ~UpdateDescriptorQueue(); void TickFrame();