mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
VideoBackends: Add AbstractStagingTexture class
Can be used for asynchronous readback or upload of textures.
This commit is contained in:
parent
a584ccc7d8
commit
f43d85921d
33 changed files with 1220 additions and 12 deletions
|
@ -21,6 +21,13 @@ enum class AbstractTextureFormat : u32
|
|||
Undefined
|
||||
};
|
||||
|
||||
enum class StagingTextureType
|
||||
{
|
||||
Readback, // Optimize for CPU reads, GPU writes, no CPU writes
|
||||
Upload, // Optimize for CPU writes, GPU reads, no CPU reads
|
||||
Mutable // Optimize for CPU reads, GPU writes, allow slow CPU reads
|
||||
};
|
||||
|
||||
struct TextureConfig
|
||||
{
|
||||
constexpr TextureConfig() = default;
|
||||
|
@ -32,7 +39,11 @@ struct TextureConfig
|
|||
}
|
||||
|
||||
bool operator==(const TextureConfig& o) const;
|
||||
bool operator!=(const TextureConfig& o) const;
|
||||
MathUtil::Rectangle<int> GetRect() const;
|
||||
MathUtil::Rectangle<int> GetMipRect(u32 level) const;
|
||||
size_t GetStride() const;
|
||||
size_t GetMipStride(u32 level) const;
|
||||
|
||||
u32 width = 0;
|
||||
u32 height = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue