diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_vulkan/renderer_vulkan.h | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_blit_screen.cpp | 88 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_blit_screen.h | 12 |
3 files changed, 51 insertions, 51 deletions
diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.h b/src/video_core/renderer_vulkan/renderer_vulkan.h index 8a8cb347c..17a16e275 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.h +++ b/src/video_core/renderer_vulkan/renderer_vulkan.h | |||
| @@ -72,7 +72,7 @@ private: | |||
| 72 | StateTracker state_tracker; | 72 | StateTracker state_tracker; |
| 73 | VKScheduler scheduler; | 73 | VKScheduler scheduler; |
| 74 | VKSwapchain swapchain; | 74 | VKSwapchain swapchain; |
| 75 | VKBlitScreen blit_screen; | 75 | BlitScreen blit_screen; |
| 76 | RasterizerVulkan rasterizer; | 76 | RasterizerVulkan rasterizer; |
| 77 | }; | 77 | }; |
| 78 | 78 | ||
diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index 289bfd7b6..462e8f86b 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp | |||
| @@ -108,7 +108,7 @@ VkFormat GetFormat(const Tegra::FramebufferConfig& framebuffer) { | |||
| 108 | 108 | ||
| 109 | } // Anonymous namespace | 109 | } // Anonymous namespace |
| 110 | 110 | ||
| 111 | struct VKBlitScreen::BufferData { | 111 | struct BlitScreen::BufferData { |
| 112 | struct { | 112 | struct { |
| 113 | std::array<f32, 4 * 4> modelview_matrix; | 113 | std::array<f32, 4 * 4> modelview_matrix; |
| 114 | } uniform; | 114 | } uniform; |
| @@ -118,10 +118,10 @@ struct VKBlitScreen::BufferData { | |||
| 118 | // Unaligned image data goes here | 118 | // Unaligned image data goes here |
| 119 | }; | 119 | }; |
| 120 | 120 | ||
| 121 | VKBlitScreen::VKBlitScreen(Core::Memory::Memory& cpu_memory_, | 121 | BlitScreen::BlitScreen(Core::Memory::Memory& cpu_memory_, Core::Frontend::EmuWindow& render_window_, |
| 122 | Core::Frontend::EmuWindow& render_window_, const Device& device_, | 122 | const Device& device_, MemoryAllocator& memory_allocator_, |
| 123 | MemoryAllocator& memory_allocator_, VKSwapchain& swapchain_, | 123 | VKSwapchain& swapchain_, VKScheduler& scheduler_, |
| 124 | VKScheduler& scheduler_, const VKScreenInfo& screen_info_) | 124 | const VKScreenInfo& screen_info_) |
| 125 | : cpu_memory{cpu_memory_}, render_window{render_window_}, device{device_}, | 125 | : cpu_memory{cpu_memory_}, render_window{render_window_}, device{device_}, |
| 126 | memory_allocator{memory_allocator_}, swapchain{swapchain_}, scheduler{scheduler_}, | 126 | memory_allocator{memory_allocator_}, swapchain{swapchain_}, scheduler{scheduler_}, |
| 127 | image_count{swapchain.GetImageCount()}, screen_info{screen_info_} { | 127 | image_count{swapchain.GetImageCount()}, screen_info{screen_info_} { |
| @@ -131,16 +131,16 @@ VKBlitScreen::VKBlitScreen(Core::Memory::Memory& cpu_memory_, | |||
| 131 | CreateDynamicResources(); | 131 | CreateDynamicResources(); |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | VKBlitScreen::~VKBlitScreen() = default; | 134 | BlitScreen::~BlitScreen() = default; |
| 135 | 135 | ||
| 136 | void VKBlitScreen::Recreate() { | 136 | void BlitScreen::Recreate() { |
| 137 | CreateDynamicResources(); | 137 | CreateDynamicResources(); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | VkSemaphore VKBlitScreen::Draw(const Tegra::FramebufferConfig& framebuffer, | 140 | VkSemaphore BlitScreen::Draw(const Tegra::FramebufferConfig& framebuffer, |
| 141 | const VkFramebuffer& host_framebuffer, | 141 | const VkFramebuffer& host_framebuffer, |
| 142 | const Layout::FramebufferLayout layout, VkExtent2D render_area, | 142 | const Layout::FramebufferLayout layout, VkExtent2D render_area, |
| 143 | bool use_accelerated) { | 143 | bool use_accelerated) { |
| 144 | RefreshResources(framebuffer); | 144 | RefreshResources(framebuffer); |
| 145 | 145 | ||
| 146 | // Finish any pending renderpass | 146 | // Finish any pending renderpass |
| @@ -419,20 +419,20 @@ VkSemaphore VKBlitScreen::Draw(const Tegra::FramebufferConfig& framebuffer, | |||
| 419 | return *semaphores[image_index]; | 419 | return *semaphores[image_index]; |
| 420 | } | 420 | } |
| 421 | 421 | ||
| 422 | VkSemaphore VKBlitScreen::DrawToSwapchain(const Tegra::FramebufferConfig& framebuffer, | 422 | VkSemaphore BlitScreen::DrawToSwapchain(const Tegra::FramebufferConfig& framebuffer, |
| 423 | bool use_accelerated) { | 423 | bool use_accelerated) { |
| 424 | const std::size_t image_index = swapchain.GetImageIndex(); | 424 | const std::size_t image_index = swapchain.GetImageIndex(); |
| 425 | const VkExtent2D render_area = swapchain.GetSize(); | 425 | const VkExtent2D render_area = swapchain.GetSize(); |
| 426 | const Layout::FramebufferLayout layout = render_window.GetFramebufferLayout(); | 426 | const Layout::FramebufferLayout layout = render_window.GetFramebufferLayout(); |
| 427 | return Draw(framebuffer, *framebuffers[image_index], layout, render_area, use_accelerated); | 427 | return Draw(framebuffer, *framebuffers[image_index], layout, render_area, use_accelerated); |
| 428 | } | 428 | } |
| 429 | 429 | ||
| 430 | vk::Framebuffer VKBlitScreen::CreateFramebuffer(const VkImageView& image_view, VkExtent2D extent) { | 430 | vk::Framebuffer BlitScreen::CreateFramebuffer(const VkImageView& image_view, VkExtent2D extent) { |
| 431 | return CreateFramebuffer(image_view, extent, renderpass); | 431 | return CreateFramebuffer(image_view, extent, renderpass); |
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | vk::Framebuffer VKBlitScreen::CreateFramebuffer(const VkImageView& image_view, VkExtent2D extent, | 434 | vk::Framebuffer BlitScreen::CreateFramebuffer(const VkImageView& image_view, VkExtent2D extent, |
| 435 | vk::RenderPass& rd) { | 435 | vk::RenderPass& rd) { |
| 436 | return device.GetLogical().CreateFramebuffer(VkFramebufferCreateInfo{ | 436 | return device.GetLogical().CreateFramebuffer(VkFramebufferCreateInfo{ |
| 437 | .sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, | 437 | .sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, |
| 438 | .pNext = nullptr, | 438 | .pNext = nullptr, |
| @@ -446,7 +446,7 @@ vk::Framebuffer VKBlitScreen::CreateFramebuffer(const VkImageView& image_view, V | |||
| 446 | }); | 446 | }); |
| 447 | } | 447 | } |
| 448 | 448 | ||
| 449 | void VKBlitScreen::CreateStaticResources() { | 449 | void BlitScreen::CreateStaticResources() { |
| 450 | CreateShaders(); | 450 | CreateShaders(); |
| 451 | CreateSemaphores(); | 451 | CreateSemaphores(); |
| 452 | CreateDescriptorPool(); | 452 | CreateDescriptorPool(); |
| @@ -456,7 +456,7 @@ void VKBlitScreen::CreateStaticResources() { | |||
| 456 | CreateSampler(); | 456 | CreateSampler(); |
| 457 | } | 457 | } |
| 458 | 458 | ||
| 459 | void VKBlitScreen::CreateDynamicResources() { | 459 | void BlitScreen::CreateDynamicResources() { |
| 460 | CreateRenderPass(); | 460 | CreateRenderPass(); |
| 461 | CreateFramebuffers(); | 461 | CreateFramebuffers(); |
| 462 | CreateGraphicsPipeline(); | 462 | CreateGraphicsPipeline(); |
| @@ -466,7 +466,7 @@ void VKBlitScreen::CreateDynamicResources() { | |||
| 466 | } | 466 | } |
| 467 | } | 467 | } |
| 468 | 468 | ||
| 469 | void VKBlitScreen::RefreshResources(const Tegra::FramebufferConfig& framebuffer) { | 469 | void BlitScreen::RefreshResources(const Tegra::FramebufferConfig& framebuffer) { |
| 470 | if (Settings::values.scaling_filter.GetValue() == Settings::ScalingFilter::Fsr) { | 470 | if (Settings::values.scaling_filter.GetValue() == Settings::ScalingFilter::Fsr) { |
| 471 | if (!fsr) { | 471 | if (!fsr) { |
| 472 | CreateFSR(); | 472 | CreateFSR(); |
| @@ -486,7 +486,7 @@ void VKBlitScreen::RefreshResources(const Tegra::FramebufferConfig& framebuffer) | |||
| 486 | CreateRawImages(framebuffer); | 486 | CreateRawImages(framebuffer); |
| 487 | } | 487 | } |
| 488 | 488 | ||
| 489 | void VKBlitScreen::CreateShaders() { | 489 | void BlitScreen::CreateShaders() { |
| 490 | vertex_shader = BuildShader(device, VULKAN_PRESENT_VERT_SPV); | 490 | vertex_shader = BuildShader(device, VULKAN_PRESENT_VERT_SPV); |
| 491 | fxaa_vertex_shader = BuildShader(device, FXAA_VERT_SPV); | 491 | fxaa_vertex_shader = BuildShader(device, FXAA_VERT_SPV); |
| 492 | fxaa_fragment_shader = BuildShader(device, FXAA_FRAG_SPV); | 492 | fxaa_fragment_shader = BuildShader(device, FXAA_FRAG_SPV); |
| @@ -500,12 +500,12 @@ void VKBlitScreen::CreateShaders() { | |||
| 500 | } | 500 | } |
| 501 | } | 501 | } |
| 502 | 502 | ||
| 503 | void VKBlitScreen::CreateSemaphores() { | 503 | void BlitScreen::CreateSemaphores() { |
| 504 | semaphores.resize(image_count); | 504 | semaphores.resize(image_count); |
| 505 | std::ranges::generate(semaphores, [this] { return device.GetLogical().CreateSemaphore(); }); | 505 | std::ranges::generate(semaphores, [this] { return device.GetLogical().CreateSemaphore(); }); |
| 506 | } | 506 | } |
| 507 | 507 | ||
| 508 | void VKBlitScreen::CreateDescriptorPool() { | 508 | void BlitScreen::CreateDescriptorPool() { |
| 509 | const std::array<VkDescriptorPoolSize, 2> pool_sizes{{ | 509 | const std::array<VkDescriptorPoolSize, 2> pool_sizes{{ |
| 510 | { | 510 | { |
| 511 | .type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, | 511 | .type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, |
| @@ -545,11 +545,11 @@ void VKBlitScreen::CreateDescriptorPool() { | |||
| 545 | aa_descriptor_pool = device.GetLogical().CreateDescriptorPool(ci_aa); | 545 | aa_descriptor_pool = device.GetLogical().CreateDescriptorPool(ci_aa); |
| 546 | } | 546 | } |
| 547 | 547 | ||
| 548 | void VKBlitScreen::CreateRenderPass() { | 548 | void BlitScreen::CreateRenderPass() { |
| 549 | renderpass = CreateRenderPassImpl(swapchain.GetImageViewFormat()); | 549 | renderpass = CreateRenderPassImpl(swapchain.GetImageViewFormat()); |
| 550 | } | 550 | } |
| 551 | 551 | ||
| 552 | vk::RenderPass VKBlitScreen::CreateRenderPassImpl(VkFormat format, bool is_present) { | 552 | vk::RenderPass BlitScreen::CreateRenderPassImpl(VkFormat format, bool is_present) { |
| 553 | const VkAttachmentDescription color_attachment{ | 553 | const VkAttachmentDescription color_attachment{ |
| 554 | .flags = 0, | 554 | .flags = 0, |
| 555 | .format = format, | 555 | .format = format, |
| @@ -605,7 +605,7 @@ vk::RenderPass VKBlitScreen::CreateRenderPassImpl(VkFormat format, bool is_prese | |||
| 605 | return device.GetLogical().CreateRenderPass(renderpass_ci); | 605 | return device.GetLogical().CreateRenderPass(renderpass_ci); |
| 606 | } | 606 | } |
| 607 | 607 | ||
| 608 | void VKBlitScreen::CreateDescriptorSetLayout() { | 608 | void BlitScreen::CreateDescriptorSetLayout() { |
| 609 | const std::array<VkDescriptorSetLayoutBinding, 2> layout_bindings{{ | 609 | const std::array<VkDescriptorSetLayoutBinding, 2> layout_bindings{{ |
| 610 | { | 610 | { |
| 611 | .binding = 0, | 611 | .binding = 0, |
| @@ -660,7 +660,7 @@ void VKBlitScreen::CreateDescriptorSetLayout() { | |||
| 660 | aa_descriptor_set_layout = device.GetLogical().CreateDescriptorSetLayout(ci_aa); | 660 | aa_descriptor_set_layout = device.GetLogical().CreateDescriptorSetLayout(ci_aa); |
| 661 | } | 661 | } |
| 662 | 662 | ||
| 663 | void VKBlitScreen::CreateDescriptorSets() { | 663 | void BlitScreen::CreateDescriptorSets() { |
| 664 | const std::vector layouts(image_count, *descriptor_set_layout); | 664 | const std::vector layouts(image_count, *descriptor_set_layout); |
| 665 | const std::vector layouts_aa(image_count, *aa_descriptor_set_layout); | 665 | const std::vector layouts_aa(image_count, *aa_descriptor_set_layout); |
| 666 | 666 | ||
| @@ -684,7 +684,7 @@ void VKBlitScreen::CreateDescriptorSets() { | |||
| 684 | aa_descriptor_sets = aa_descriptor_pool.Allocate(ai_aa); | 684 | aa_descriptor_sets = aa_descriptor_pool.Allocate(ai_aa); |
| 685 | } | 685 | } |
| 686 | 686 | ||
| 687 | void VKBlitScreen::CreatePipelineLayout() { | 687 | void BlitScreen::CreatePipelineLayout() { |
| 688 | const VkPipelineLayoutCreateInfo ci{ | 688 | const VkPipelineLayoutCreateInfo ci{ |
| 689 | .sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, | 689 | .sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, |
| 690 | .pNext = nullptr, | 690 | .pNext = nullptr, |
| @@ -707,7 +707,7 @@ void VKBlitScreen::CreatePipelineLayout() { | |||
| 707 | aa_pipeline_layout = device.GetLogical().CreatePipelineLayout(ci_aa); | 707 | aa_pipeline_layout = device.GetLogical().CreatePipelineLayout(ci_aa); |
| 708 | } | 708 | } |
| 709 | 709 | ||
| 710 | void VKBlitScreen::CreateGraphicsPipeline() { | 710 | void BlitScreen::CreateGraphicsPipeline() { |
| 711 | const std::array<VkPipelineShaderStageCreateInfo, 2> bilinear_shader_stages{{ | 711 | const std::array<VkPipelineShaderStageCreateInfo, 2> bilinear_shader_stages{{ |
| 712 | { | 712 | { |
| 713 | .sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, | 713 | .sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, |
| @@ -980,7 +980,7 @@ void VKBlitScreen::CreateGraphicsPipeline() { | |||
| 980 | scaleforce_pipeline = device.GetLogical().CreateGraphicsPipeline(scaleforce_pipeline_ci); | 980 | scaleforce_pipeline = device.GetLogical().CreateGraphicsPipeline(scaleforce_pipeline_ci); |
| 981 | } | 981 | } |
| 982 | 982 | ||
| 983 | void VKBlitScreen::CreateSampler() { | 983 | void BlitScreen::CreateSampler() { |
| 984 | const VkSamplerCreateInfo ci{ | 984 | const VkSamplerCreateInfo ci{ |
| 985 | .sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, | 985 | .sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, |
| 986 | .pNext = nullptr, | 986 | .pNext = nullptr, |
| @@ -1027,7 +1027,7 @@ void VKBlitScreen::CreateSampler() { | |||
| 1027 | nn_sampler = device.GetLogical().CreateSampler(ci_nn); | 1027 | nn_sampler = device.GetLogical().CreateSampler(ci_nn); |
| 1028 | } | 1028 | } |
| 1029 | 1029 | ||
| 1030 | void VKBlitScreen::CreateFramebuffers() { | 1030 | void BlitScreen::CreateFramebuffers() { |
| 1031 | const VkExtent2D size{swapchain.GetSize()}; | 1031 | const VkExtent2D size{swapchain.GetSize()}; |
| 1032 | framebuffers.resize(image_count); | 1032 | framebuffers.resize(image_count); |
| 1033 | 1033 | ||
| @@ -1037,7 +1037,7 @@ void VKBlitScreen::CreateFramebuffers() { | |||
| 1037 | } | 1037 | } |
| 1038 | } | 1038 | } |
| 1039 | 1039 | ||
| 1040 | void VKBlitScreen::ReleaseRawImages() { | 1040 | void BlitScreen::ReleaseRawImages() { |
| 1041 | for (const u64 tick : resource_ticks) { | 1041 | for (const u64 tick : resource_ticks) { |
| 1042 | scheduler.Wait(tick); | 1042 | scheduler.Wait(tick); |
| 1043 | } | 1043 | } |
| @@ -1052,7 +1052,7 @@ void VKBlitScreen::ReleaseRawImages() { | |||
| 1052 | buffer_commit = MemoryCommit{}; | 1052 | buffer_commit = MemoryCommit{}; |
| 1053 | } | 1053 | } |
| 1054 | 1054 | ||
| 1055 | void VKBlitScreen::CreateStagingBuffer(const Tegra::FramebufferConfig& framebuffer) { | 1055 | void BlitScreen::CreateStagingBuffer(const Tegra::FramebufferConfig& framebuffer) { |
| 1056 | const VkBufferCreateInfo ci{ | 1056 | const VkBufferCreateInfo ci{ |
| 1057 | .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, | 1057 | .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, |
| 1058 | .pNext = nullptr, | 1058 | .pNext = nullptr, |
| @@ -1069,7 +1069,7 @@ void VKBlitScreen::CreateStagingBuffer(const Tegra::FramebufferConfig& framebuff | |||
| 1069 | buffer_commit = memory_allocator.Commit(buffer, MemoryUsage::Upload); | 1069 | buffer_commit = memory_allocator.Commit(buffer, MemoryUsage::Upload); |
| 1070 | } | 1070 | } |
| 1071 | 1071 | ||
| 1072 | void VKBlitScreen::CreateRawImages(const Tegra::FramebufferConfig& framebuffer) { | 1072 | void BlitScreen::CreateRawImages(const Tegra::FramebufferConfig& framebuffer) { |
| 1073 | raw_images.resize(image_count); | 1073 | raw_images.resize(image_count); |
| 1074 | raw_image_views.resize(image_count); | 1074 | raw_image_views.resize(image_count); |
| 1075 | raw_buffer_commits.resize(image_count); | 1075 | raw_buffer_commits.resize(image_count); |
| @@ -1294,8 +1294,8 @@ void VKBlitScreen::CreateRawImages(const Tegra::FramebufferConfig& framebuffer) | |||
| 1294 | aa_pipeline = device.GetLogical().CreateGraphicsPipeline(fxaa_pipeline_ci); | 1294 | aa_pipeline = device.GetLogical().CreateGraphicsPipeline(fxaa_pipeline_ci); |
| 1295 | } | 1295 | } |
| 1296 | 1296 | ||
| 1297 | void VKBlitScreen::UpdateAADescriptorSet(std::size_t image_index, VkImageView image_view, | 1297 | void BlitScreen::UpdateAADescriptorSet(std::size_t image_index, VkImageView image_view, |
| 1298 | bool nn) const { | 1298 | bool nn) const { |
| 1299 | const VkDescriptorImageInfo image_info{ | 1299 | const VkDescriptorImageInfo image_info{ |
| 1300 | .sampler = nn ? *nn_sampler : *sampler, | 1300 | .sampler = nn ? *nn_sampler : *sampler, |
| 1301 | .imageView = image_view, | 1301 | .imageView = image_view, |
| @@ -1331,8 +1331,8 @@ void VKBlitScreen::UpdateAADescriptorSet(std::size_t image_index, VkImageView im | |||
| 1331 | device.GetLogical().UpdateDescriptorSets(std::array{sampler_write, sampler_write_2}, {}); | 1331 | device.GetLogical().UpdateDescriptorSets(std::array{sampler_write, sampler_write_2}, {}); |
| 1332 | } | 1332 | } |
| 1333 | 1333 | ||
| 1334 | void VKBlitScreen::UpdateDescriptorSet(std::size_t image_index, VkImageView image_view, | 1334 | void BlitScreen::UpdateDescriptorSet(std::size_t image_index, VkImageView image_view, |
| 1335 | bool nn) const { | 1335 | bool nn) const { |
| 1336 | const VkDescriptorBufferInfo buffer_info{ | 1336 | const VkDescriptorBufferInfo buffer_info{ |
| 1337 | .buffer = *buffer, | 1337 | .buffer = *buffer, |
| 1338 | .offset = offsetof(BufferData, uniform), | 1338 | .offset = offsetof(BufferData, uniform), |
| @@ -1374,13 +1374,13 @@ void VKBlitScreen::UpdateDescriptorSet(std::size_t image_index, VkImageView imag | |||
| 1374 | device.GetLogical().UpdateDescriptorSets(std::array{ubo_write, sampler_write}, {}); | 1374 | device.GetLogical().UpdateDescriptorSets(std::array{ubo_write, sampler_write}, {}); |
| 1375 | } | 1375 | } |
| 1376 | 1376 | ||
| 1377 | void VKBlitScreen::SetUniformData(BufferData& data, const Layout::FramebufferLayout layout) const { | 1377 | void BlitScreen::SetUniformData(BufferData& data, const Layout::FramebufferLayout layout) const { |
| 1378 | data.uniform.modelview_matrix = | 1378 | data.uniform.modelview_matrix = |
| 1379 | MakeOrthographicMatrix(static_cast<f32>(layout.width), static_cast<f32>(layout.height)); | 1379 | MakeOrthographicMatrix(static_cast<f32>(layout.width), static_cast<f32>(layout.height)); |
| 1380 | } | 1380 | } |
| 1381 | 1381 | ||
| 1382 | void VKBlitScreen::SetVertexData(BufferData& data, const Tegra::FramebufferConfig& framebuffer, | 1382 | void BlitScreen::SetVertexData(BufferData& data, const Tegra::FramebufferConfig& framebuffer, |
| 1383 | const Layout::FramebufferLayout layout) const { | 1383 | const Layout::FramebufferLayout layout) const { |
| 1384 | const auto& framebuffer_transform_flags = framebuffer.transform_flags; | 1384 | const auto& framebuffer_transform_flags = framebuffer.transform_flags; |
| 1385 | const auto& framebuffer_crop_rect = framebuffer.crop_rect; | 1385 | const auto& framebuffer_crop_rect = framebuffer.crop_rect; |
| 1386 | 1386 | ||
| @@ -1432,7 +1432,7 @@ void VKBlitScreen::SetVertexData(BufferData& data, const Tegra::FramebufferConfi | |||
| 1432 | data.vertices[3] = ScreenRectVertex(x + w, y + h, texcoords.bottom * scale_u, right * scale_v); | 1432 | data.vertices[3] = ScreenRectVertex(x + w, y + h, texcoords.bottom * scale_u, right * scale_v); |
| 1433 | } | 1433 | } |
| 1434 | 1434 | ||
| 1435 | void VKBlitScreen::CreateFSR() { | 1435 | void BlitScreen::CreateFSR() { |
| 1436 | const auto& layout = render_window.GetFramebufferLayout(); | 1436 | const auto& layout = render_window.GetFramebufferLayout(); |
| 1437 | const VkExtent2D fsr_size{ | 1437 | const VkExtent2D fsr_size{ |
| 1438 | .width = layout.screen.GetWidth(), | 1438 | .width = layout.screen.GetWidth(), |
| @@ -1441,12 +1441,12 @@ void VKBlitScreen::CreateFSR() { | |||
| 1441 | fsr = std::make_unique<FSR>(device, memory_allocator, image_count, fsr_size); | 1441 | fsr = std::make_unique<FSR>(device, memory_allocator, image_count, fsr_size); |
| 1442 | } | 1442 | } |
| 1443 | 1443 | ||
| 1444 | u64 VKBlitScreen::CalculateBufferSize(const Tegra::FramebufferConfig& framebuffer) const { | 1444 | u64 BlitScreen::CalculateBufferSize(const Tegra::FramebufferConfig& framebuffer) const { |
| 1445 | return sizeof(BufferData) + GetSizeInBytes(framebuffer) * image_count; | 1445 | return sizeof(BufferData) + GetSizeInBytes(framebuffer) * image_count; |
| 1446 | } | 1446 | } |
| 1447 | 1447 | ||
| 1448 | u64 VKBlitScreen::GetRawImageOffset(const Tegra::FramebufferConfig& framebuffer, | 1448 | u64 BlitScreen::GetRawImageOffset(const Tegra::FramebufferConfig& framebuffer, |
| 1449 | std::size_t image_index) const { | 1449 | std::size_t image_index) const { |
| 1450 | constexpr auto first_image_offset = static_cast<u64>(sizeof(BufferData)); | 1450 | constexpr auto first_image_offset = static_cast<u64>(sizeof(BufferData)); |
| 1451 | return first_image_offset + GetSizeInBytes(framebuffer) * image_index; | 1451 | return first_image_offset + GetSizeInBytes(framebuffer) * image_index; |
| 1452 | } | 1452 | } |
diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.h b/src/video_core/renderer_vulkan/vk_blit_screen.h index 1b4260f36..3ed1a9537 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.h +++ b/src/video_core/renderer_vulkan/vk_blit_screen.h | |||
| @@ -45,13 +45,13 @@ struct VKScreenInfo { | |||
| 45 | bool is_srgb{}; | 45 | bool is_srgb{}; |
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| 48 | class VKBlitScreen { | 48 | class BlitScreen { |
| 49 | public: | 49 | public: |
| 50 | explicit VKBlitScreen(Core::Memory::Memory& cpu_memory, | 50 | explicit BlitScreen(Core::Memory::Memory& cpu_memory, Core::Frontend::EmuWindow& render_window, |
| 51 | Core::Frontend::EmuWindow& render_window, const Device& device, | 51 | const Device& device, MemoryAllocator& memory_manager, |
| 52 | MemoryAllocator& memory_manager, VKSwapchain& swapchain, | 52 | VKSwapchain& swapchain, VKScheduler& scheduler, |
| 53 | VKScheduler& scheduler, const VKScreenInfo& screen_info); | 53 | const VKScreenInfo& screen_info); |
| 54 | ~VKBlitScreen(); | 54 | ~BlitScreen(); |
| 55 | 55 | ||
| 56 | void Recreate(); | 56 | void Recreate(); |
| 57 | 57 | ||