mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
VideoCommon: remove HiResTexture DDS loading, update hirestexture logic to use custom texture data
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "VideoCommon/GraphicsModSystem/Runtime/CustomTextureData.h"
|
||||
#include "VideoCommon/TextureConfig.h"
|
||||
#include "VideoCommon/TextureInfo.h"
|
||||
|
||||
@ -29,31 +30,21 @@ public:
|
||||
|
||||
static std::string GenBaseName(const TextureInfo& texture_info, bool dump = false);
|
||||
|
||||
static u32 CalculateMipCount(u32 width, u32 height);
|
||||
|
||||
~HiresTexture();
|
||||
|
||||
AbstractTextureFormat GetFormat() const;
|
||||
bool HasArbitraryMipmaps() const;
|
||||
|
||||
struct Level
|
||||
{
|
||||
std::vector<u8> data;
|
||||
AbstractTextureFormat format = AbstractTextureFormat::RGBA8;
|
||||
u32 width = 0;
|
||||
u32 height = 0;
|
||||
u32 row_length = 0;
|
||||
};
|
||||
std::vector<Level> m_levels;
|
||||
VideoCommon::CustomTextureData& GetData() { return m_data; }
|
||||
const VideoCommon::CustomTextureData& GetData() const { return m_data; }
|
||||
|
||||
private:
|
||||
static std::unique_ptr<HiresTexture> Load(const std::string& base_filename, u32 width,
|
||||
u32 height);
|
||||
static bool LoadDDSTexture(HiresTexture* tex, const std::string& filename);
|
||||
static bool LoadDDSTexture(Level& level, const std::string& filename, u32 mip_level);
|
||||
static bool LoadTexture(Level& level, const std::vector<u8>& buffer);
|
||||
static void Prefetch();
|
||||
|
||||
HiresTexture() = default;
|
||||
|
||||
VideoCommon::CustomTextureData m_data;
|
||||
bool m_has_arbitrary_mipmaps = false;
|
||||
};
|
||||
|
Reference in New Issue
Block a user