From c73232a2993c5348c121707f88c6c8de5042439e Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Sat, 31 Jan 2026 23:21:19 -0400 Subject: [PATCH] Revert "[vulkan] Establishin pColorAttachments pass thorugh DynamicRendering commands" --- .../renderer_vulkan/vk_texture_cache.cpp | 70 ------------------- .../renderer_vulkan/vk_texture_cache.h | 6 +- 2 files changed, 2 insertions(+), 74 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index b35ea2537b..9d6f3e1c8b 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -2378,65 +2377,6 @@ Framebuffer::Framebuffer(TextureCacheRuntime& runtime, ImageView* color_buffer, Framebuffer::~Framebuffer() = default; -Framebuffer::Framebuffer(Framebuffer&& other) noexcept - : framebuffer{std::move(other.framebuffer)}, - renderpass{std::exchange(other.renderpass, VkRenderPass{})}, - render_area{other.render_area}, - samples{other.samples}, - num_color_buffers{other.num_color_buffers}, - num_images{other.num_images}, - images{other.images}, - image_ranges{other.image_ranges}, - rt_map{other.rt_map}, - has_depth{other.has_depth}, - has_stencil{other.has_stencil}, - is_rescaled{other.is_rescaled}, - color_attachment_infos{other.color_attachment_infos}, - depth_attachment_info{other.depth_attachment_info}, - rendering_info{other.rendering_info} { - other.num_color_buffers = 0; - other.num_images = 0; - other.has_depth = false; - other.has_stencil = false; - other.rendering_info.pColorAttachments = nullptr; - other.rendering_info.pDepthAttachment = nullptr; - other.rendering_info.pStencilAttachment = nullptr; - FixupRenderingInfoPointers(); -} - -Framebuffer& Framebuffer::operator=(Framebuffer&& other) noexcept { - if (this == &other) { - return *this; - } - - framebuffer = std::move(other.framebuffer); - renderpass = std::exchange(other.renderpass, VkRenderPass{}); - render_area = other.render_area; - samples = other.samples; - num_color_buffers = other.num_color_buffers; - num_images = other.num_images; - images = other.images; - image_ranges = other.image_ranges; - rt_map = other.rt_map; - has_depth = other.has_depth; - has_stencil = other.has_stencil; - is_rescaled = other.is_rescaled; - color_attachment_infos = other.color_attachment_infos; - depth_attachment_info = other.depth_attachment_info; - rendering_info = other.rendering_info; - - other.num_color_buffers = 0; - other.num_images = 0; - other.has_depth = false; - other.has_stencil = false; - other.rendering_info.pColorAttachments = nullptr; - other.rendering_info.pDepthAttachment = nullptr; - other.rendering_info.pStencilAttachment = nullptr; - - FixupRenderingInfoPointers(); - return *this; -} - void Framebuffer::CreateFramebuffer(TextureCacheRuntime& runtime, std::span color_buffers, ImageView* depth_buffer, bool is_rescaled_) { @@ -2550,16 +2490,6 @@ void Framebuffer::CreateFramebuffer(TextureCacheRuntime& runtime, .height = render_area.height, .layers = static_cast((std::max)(num_layers, 1)), }); - - FixupRenderingInfoPointers(); -} - -void Framebuffer::FixupRenderingInfoPointers() noexcept { - rendering_info.pColorAttachments = rendering_info.colorAttachmentCount > 0 - ? color_attachment_infos.data() - : nullptr; - rendering_info.pDepthAttachment = has_depth ? &depth_attachment_info : nullptr; - rendering_info.pStencilAttachment = has_stencil ? &depth_attachment_info : nullptr; } void TextureCacheRuntime::AccelerateImageUpload( diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h index 973cf08250..d67a5e3293 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.h +++ b/src/video_core/renderer_vulkan/vk_texture_cache.h @@ -154,8 +154,8 @@ public: Framebuffer(const Framebuffer&) = delete; Framebuffer& operator=(const Framebuffer&) = delete; - Framebuffer(Framebuffer&&) noexcept; - Framebuffer& operator=(Framebuffer&&) noexcept; + Framebuffer(Framebuffer&&) = default; + Framebuffer& operator=(Framebuffer&&) = default; void CreateFramebuffer(TextureCacheRuntime& runtime, std::span color_buffers, ImageView* depth_buffer, @@ -231,8 +231,6 @@ private: std::array color_attachment_infos{}; VkRenderingAttachmentInfo depth_attachment_info{}; VkRenderingInfo rendering_info{}; - - void FixupRenderingInfoPointers() noexcept; }; class Image : public VideoCommon::ImageBase {