Files
parallel-gx1/Source/Core/VideoCommon/FrameOutput.h
T
LibretroAdmin 919e8c5181 Video: the frontend's frame targets in place of swap chains
The frontend owns the window and presents, so the D3D11, D3D12 and
Vulkan backends draw their picture into a FrameOutput, a render target
the frontend reads where it is, rather than a swap chain. D3D11 hands
over one texture at pixel shader slot 0. D3D12 negotiates version 2 of
its interface and keeps one texture per sync index, handed over with
the fence its picture completes on, falling back to set_texture on
version 1. Vulkan keeps one image per sync index and hands it over with
set_image, so the fake swap chain and the WSI calls hooked under it are
gone, and the device may come without a surface. The outputs are RGBA8
and report that format to the presenter.

The DXGI and Vulkan swap chains, the backends' standalone device
creation and exclusive fullscreen are removed.
2026-11-06 19:11:38 +01:00

30 lines
860 B
C++

// Copyright 2026 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "Common/CommonTypes.h"
#include "VideoCommon/TextureConfig.h"
class AbstractFramebuffer;
/* Where a backend draws the picture it presents, and what hands that
* picture to whoever shows it: the frontend owns the window, so this is
* a render target the frontend reads in place, not a swap chain. */
class FrameOutput
{
public:
virtual ~FrameOutput() {}
/* The framebuffer this frame's picture goes into, once whoever shows
* the pictures is done with what it last read from it. */
virtual AbstractFramebuffer* Acquire() = 0;
/* The picture is complete: hands it on. */
virtual void Present() = 0;
virtual u32 GetWidth() const = 0;
virtual u32 GetHeight() const = 0;
virtual AbstractTextureFormat GetFormat() const = 0;
};