From db16abe84c48d7411a94a4570e3aa8ec1a26be80 Mon Sep 17 00:00:00 2001 From: iwubcode Date: Sun, 3 Aug 2025 16:46:44 -0500 Subject: [PATCH] texture asset utils --- Source/Core/VideoCommon/Assets/TextureAssetUtils.cpp | 6 +++--- Source/Core/VideoCommon/Assets/TextureAssetUtils.h | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/Core/VideoCommon/Assets/TextureAssetUtils.cpp b/Source/Core/VideoCommon/Assets/TextureAssetUtils.cpp index 5285c61bba..4d2316081e 100644 --- a/Source/Core/VideoCommon/Assets/TextureAssetUtils.cpp +++ b/Source/Core/VideoCommon/Assets/TextureAssetUtils.cpp @@ -66,8 +66,8 @@ bool LoadMips(const std::filesystem::path& asset_path, CustomTextureData::ArrayS } } // namespace bool LoadTextureDataFromFile(const CustomAssetLibrary::AssetID& asset_id, - const std::filesystem::path& asset_path, - TextureAndSamplerData::Type type, CustomTextureData* data) + const std::filesystem::path& asset_path, AbstractTextureType type, + CustomTextureData* data) { auto ext = PathToString(asset_path.extension()); Common::ToLower(&ext); @@ -92,7 +92,7 @@ bool LoadTextureDataFromFile(const CustomAssetLibrary::AssetID& asset_id, { // PNG could support more complicated texture types in the future // but for now just error - if (type != TextureAndSamplerData::Type::Type_Texture2D) + if (type != AbstractTextureType::Texture_2D) { ERROR_LOG_FMT(VIDEO, "Asset '{}' error - PNG is not supported for texture type '{}'!", asset_id, type); diff --git a/Source/Core/VideoCommon/Assets/TextureAssetUtils.h b/Source/Core/VideoCommon/Assets/TextureAssetUtils.h index ef7bc00751..8cf30547c2 100644 --- a/Source/Core/VideoCommon/Assets/TextureAssetUtils.h +++ b/Source/Core/VideoCommon/Assets/TextureAssetUtils.h @@ -7,12 +7,13 @@ #include "VideoCommon/Assets/CustomAssetLibrary.h" #include "VideoCommon/Assets/TextureAsset.h" +#include "VideoCommon/TextureConfig.h" namespace VideoCommon { bool LoadTextureDataFromFile(const CustomAssetLibrary::AssetID& asset_id, - const std::filesystem::path& asset_path, - TextureAndSamplerData::Type type, CustomTextureData* data); + const std::filesystem::path& asset_path, AbstractTextureType type, + CustomTextureData* data); bool ValidateTextureData(const CustomAssetLibrary::AssetID& asset_id, const CustomTextureData& data, u32 native_width, u32 native_height);