From 4bbc4c258a28f0e01ba08b0433c222b552ce004e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 14 Mar 2023 14:09:21 +0100 Subject: [PATCH] Remove sketch of Basis container format support (we go with KTX2 instead as the container) --- GPU/Common/ReplacedTexture.cpp | 31 ++----------------------------- GPU/Common/TextureCacheCommon.h | 2 +- 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/GPU/Common/ReplacedTexture.cpp b/GPU/Common/ReplacedTexture.cpp index 788f0bc701..df7c917ae8 100644 --- a/GPU/Common/ReplacedTexture.cpp +++ b/GPU/Common/ReplacedTexture.cpp @@ -286,36 +286,9 @@ bool ReplacedTexture::LoadLevelData(VFSFileReference *fileRef, const std::string // Additional quick checks good = good && header.layerCount <= 1; } else if (imageType == ReplacedImageType::BASIS) { - // Peek into the file using the header struct. - basist::basis_file_header header; - good = vfs_->Read(openFile, &header, sizeof(header)) == sizeof(header); + WARN_LOG(G3D, "The basis texture format is not supported. Use KTX2 (basisu texture.png -uastc -ktx2 -mipmap)"); - if (header.m_tex_format == 0) { - // ETC1S texture data (transcodable to ETC2 or DXT1) - // Check what we should transcode to. - if (desc_->formatSupport.bc123) { - *pixelFormat = Draw::DataFormat::BC1_RGBA_UNORM_BLOCK; - } else if (desc_->formatSupport.etc2) { - *pixelFormat = Draw::DataFormat::ETC2_R8G8B8A1_UNORM_BLOCK; - } else { - // We're in trouble. - good = false; - } - } else { - // UASTC texture data (transcodable to ASTC or BC7). - if (desc_->formatSupport.bc7) { - *pixelFormat = Draw::DataFormat::BC7_UNORM_BLOCK; - } else if (desc_->formatSupport.astc) { - *pixelFormat = Draw::DataFormat::ASTC_4x4_UNORM_BLOCK; - } else { - good = false; - } - } - - // TODO: Seek to the slice header array. - // vfs_->Seek(header.m_slice_desc_file_ofs); - - // We don't support basis files currently. + // We simply don't support basis files currently. good = false; } else if (imageType == ReplacedImageType::DDS) { DDSHeader header; diff --git a/GPU/Common/TextureCacheCommon.h b/GPU/Common/TextureCacheCommon.h index f50b042d89..f655fe249c 100644 --- a/GPU/Common/TextureCacheCommon.h +++ b/GPU/Common/TextureCacheCommon.h @@ -1,4 +1,4 @@ -// Copyright (c) 2013- PPSSPP Project. + // Copyright (c) 2013- PPSSPP Project. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by