VideoCommon: prevent a potential custom texture crash that can occur when a shared_ptr gets released while a pointer to its member data is still being used

This commit is contained in:
iwubcode
2023-12-09 23:43:40 -06:00
parent ccedeb4936
commit 02756be381
2 changed files with 16 additions and 12 deletions

View File

@ -346,10 +346,11 @@ private:
void SetBackupConfig(const VideoConfig& config);
RcTcacheEntry CreateTextureEntry(const TextureCreationInfo& creation_info,
const TextureInfo& texture_info, int safety_color_sample_size,
std::vector<VideoCommon::CustomTextureData*> assets_data,
bool custom_arbitrary_mipmaps, bool skip_texture_dump);
RcTcacheEntry
CreateTextureEntry(const TextureCreationInfo& creation_info, const TextureInfo& texture_info,
int safety_color_sample_size,
std::vector<std::shared_ptr<VideoCommon::TextureData>> assets_data,
bool custom_arbitrary_mipmaps, bool skip_texture_dump);
RcTcacheEntry GetXFBFromCache(u32 address, u32 width, u32 height, u32 stride);