VideoCommon: Changes to TextureCache to support decoding in backend

This commit is contained in:
Stenzek
2016-11-27 18:14:59 +10:00
parent 6ffc16d1b0
commit 79ba946d70
2 changed files with 70 additions and 16 deletions

View File

@ -171,6 +171,23 @@ public:
virtual void ConvertTexture(TCacheEntryBase* entry, TCacheEntryBase* unconverted, void* palette,
TlutFormat format) = 0;
// Returns true if the texture data and palette formats are supported by the GPU decoder.
virtual bool SupportsGPUTextureDecode(TextureFormat format, TlutFormat palette_format)
{
return false;
}
// Decodes the specified data to the GPU texture specified by entry.
// width, height are the size of the image in pixels.
// aligned_width, aligned_height are the size of the image in pixels, aligned to the block size.
// row_stride is the number of bytes for a row of blocks, not pixels.
virtual void DecodeTextureOnGPU(TCacheEntryBase* entry, u32 dst_level, const u8* data,
size_t data_size, TextureFormat format, u32 width, u32 height,
u32 aligned_width, u32 aligned_height, u32 row_stride,
const u8* palette, TlutFormat palette_format)
{
}
protected:
TextureCacheBase();
@ -225,6 +242,7 @@ private:
bool copy_cache_enable;
bool stereo_3d;
bool efb_mono_depth;
bool gpu_texture_decoding;
};
BackupConfig backup_config = {};
};