fix sgsr on android hopefully

This commit is contained in:
lizzie
2026-01-14 05:12:37 +00:00
committed by Caio Oliveira
parent 779e4f0a8d
commit cab6bde3f2
2 changed files with 7 additions and 4 deletions

View File

@@ -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);

View File

@@ -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);