Browse Source

fix sgsr on android hopefully

lizzie 4 weeks ago
parent
commit
759615cd48
  1. 5
      src/video_core/renderer_vulkan/present/sgsr.cpp
  2. 6
      src/video_core/renderer_vulkan/present/sgsr.h

5
src/video_core/renderer_vulkan/present/sgsr.cpp

@ -23,6 +23,11 @@ SGSR::SGSR(const Device& device, MemoryAllocator& memory_allocator, size_t image
: m_device{device}, m_memory_allocator{memory_allocator}
, m_image_count{image_count}, m_extent{extent}
{
// Not finished yet initializing at ctor time?
Initialize();
}
void SGSR::Initialize() {
m_dynamic_images.resize(m_image_count);
for (auto& images : m_dynamic_images) {
images.images[0] = CreateWrappedImage(m_memory_allocator, m_extent, VK_FORMAT_R16G16B16A16_SFLOAT);

6
src/video_core/renderer_vulkan/present/sgsr.h

@ -16,11 +16,9 @@ class SGSR {
public:
static constexpr size_t SGSR_STAGE_COUNT = 2;
explicit SGSR(const Device& device, MemoryAllocator& memory_allocator, size_t image_count, VkExtent2D extent);
VkImageView Draw(Scheduler& scheduler, size_t image_index, VkImage source_image,
VkImageView source_image_view, VkExtent2D input_image_extent,
const Common::Rectangle<f32>& crop_rect);
VkImageView Draw(Scheduler& scheduler, size_t image_index, VkImage source_image, VkImageView source_image_view, VkExtent2D input_image_extent, const Common::Rectangle<f32>& crop_rect);
private:
void Initialize();
void UploadImages(Scheduler& scheduler);
void UpdateDescriptorSets(VkImageView image_view, size_t image_index);

Loading…
Cancel
Save