Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion external/basis_universal/.github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: 📊 Static Checks
on: [push, pull_request]
on:
workflow_dispatch:

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-static
Expand Down
6 changes: 3 additions & 3 deletions external/basis_universal/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
;
[subrepo]
remote = https://github.com/KhronosGroup/basis_universal.git
branch = fixes_for_ktx_v5
commit = e72b15c65b4a60668972c92f57d0ddd965f140da
parent = bc8d0c29096027c5802433aa4081acd11bcc39b0
branch = fixes_for_ktx
commit = a660e7be16d667a2569890430e630ce66d31ac59
parent = b0e5077581382bd6e92c191a5082ce7822acb2f9
method = merge
cmdver = 0.4.9
336 changes: 307 additions & 29 deletions external/basis_universal/CMakeLists.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion external/basis_universal/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2019-2025 Binomial LLC
Copyright 2019-2026 Binomial LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
15 changes: 15 additions & 0 deletions external/basis_universal/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
NOTICE

Basis Universal™ Supercompressed GPU Texture Compression Library

Copyright © 2016–2026 Binomial LLC.
All rights reserved except as granted under the [Apache 2.0 license](https://github.com/BinomialLLC/basis_universal/blob/master/LICENSE).
"Basis Universal" is a trademark of Binomial LLC.

The documents in the Basis Universal wiki, and the Basis Universal library, example, and tool source code, fall under the Apache 2.0 license, unless otherwise explicitly indicated.

Redistributions or derivative works must include a readable copy of the attribution notices from this NOTICE file (see Apache License 2.0 § 4(d)).

If you modify the Basis Universal source code, specifications, or wiki documents and redistribute the files, you must cause any modified files to carry prominent notices stating that you changed the files (see Apache 2.0 §4(b)).

**This software, documentation and specifications are provided "as is", without warranty of any kind (see Apache 2.0 §§7–8).**
401 changes: 301 additions & 100 deletions external/basis_universal/README.md

Large diffs are not rendered by default.

99 changes: 99 additions & 0 deletions external/basis_universal/all_builds.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#!/usr/bin/env python3
import subprocess
import shutil
import os
import sys

# -------------------------------------------------------------------
# CONFIGURATION - Easily add new build directories and options.
# -------------------------------------------------------------------
BUILD_CONFIGS = {
"build_python": ["cmake", "-DBASISU_SSE=1 -DBASISU_BUILD_PYTHON=ON", ".."],
"build_wasm_mt": ["cmake", "-DCMAKE_TOOLCHAIN_FILE=$WASI_SDK_PATH/share/cmake/wasi-sdk-pthread.cmake -DCMAKE_BUILD_TYPE=Release -DBASISU_WASM_THREADING=ON", ".."],
"build_wasm_st": ["cmake", "-DCMAKE_TOOLCHAIN_FILE=$WASI_SDK_PATH/share/cmake/wasi-sdk.cmake -DCMAKE_BUILD_TYPE=Release -DBASISU_WASM_THREADING=OFF", ".."],
"build_native": ["cmake", "-DBASISU_SSE=1", ".."]
}
# -------------------------------------------------------------------


def log(msg):
print(f"[INFO] {msg}")


def run(cmd, work_dir):
"""
Execute a shell command after changing the working directory.
Always restore the original directory, even on exceptions.
"""

if isinstance(cmd, list):
cmd = " ".join(cmd)

original_dir = os.getcwd()

log(f"Preparing to run command:\n CMD: {cmd}\n IN: {work_dir}")
print(f"[INFO] Current working directory before change: {original_dir}")

try:
os.chdir(work_dir)
print(f"[INFO] Changed working directory to: {os.getcwd()}")

log(f"Running command: {cmd}")
subprocess.check_call(cmd, shell=True)

except subprocess.CalledProcessError:
log(f"ERROR: Command failed: {cmd}")
raise

finally:
# Always restore the directory
os.chdir(original_dir)
print(f"[INFO] Restored working directory to: {original_dir}")


def clean_build_dirs():
log("Cleaning all build directories...")
for build_dir in BUILD_CONFIGS:
if os.path.isdir(build_dir):
log(f"Deleting directory: {build_dir}")
shutil.rmtree(build_dir)
else:
log(f"Directory not found, skipping: {build_dir}")
log("Clean complete.\n")


def create_dir(path):
if not os.path.isdir(path):
log(f"Creating directory: {path}")
os.makedirs(path)
else:
log(f"Directory already exists: {path}")


def perform_builds():
for build_dir, cmake_cmd in BUILD_CONFIGS.items():
log(f"Starting build in: {build_dir}")

create_dir(build_dir)

# Run CMake inside the directory
log(f"Executing CMake for {build_dir}")
run(cmake_cmd, work_dir=build_dir)

# Run Make inside the directory
log(f"Running make for {build_dir}")
run("make", work_dir=build_dir)

log(f"Finished build for {build_dir}\n")


def main():
if "--clean" in sys.argv:
clean_build_dirs()

perform_builds()
log("SUCCESS\n")


if __name__ == "__main__":
main()
34 changes: 33 additions & 1 deletion external/basis_universal/appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,51 @@ environment:
APPVEYOR_YML_DISABLE_PS_LINUX: true

build_script:
# ============================
# Windows (PowerShell)
# ============================
- ps: |
New-Item -Path . -Name "build" -ItemType "directory"
cd build

cmake --version

cmake ../ -DCMAKE_BUILD_TYPE:STRING="$env:CONFIGURATION"
if ($LASTEXITCODE -ne 0) {
Write-Host "ERROR: CMake configuration failed"
exit $LASTEXITCODE
}

cmake --build . --config $env:CONFIGURATION
if ($LASTEXITCODE -ne 0) {
Write-Host "ERROR: Build failed"
exit $LASTEXITCODE
}

cd ../


# ============================
# Linux + macOS (sh)
# ============================
- sh: |
mkdir build
cd build

cmake --version

cmake ../ -DCMAKE_BUILD_TYPE:STRING="${CONFIGURATION}"
if [ $? -ne 0 ]; then
echo "ERROR: CMake configuration failed"
exit 1
fi

cmake --build . --config ${CONFIGURATION}
if [ $? -ne 0 ]; then
echo "ERROR: Build failed"
exit 1
fi

cd ../

artifacts:
Expand All @@ -32,4 +64,4 @@ artifacts:
# MacOS
- path: bin/basisu
# Windows
- path: bin\$(configuration)\basisu.exe
- path: bin\$(CONFIGURATION)\basisu.exe
32 changes: 30 additions & 2 deletions external/basis_universal/basisu.sln
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34322.80
# Visual Studio Version 18
VisualStudioVersion = 18.0.11222.15
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basisu", "basisu.vcxproj", "{59586A07-8E7E-411D-BC3D-387E039AA423}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example\example.vcxproj", "{2F297CF8-B392-4A5A-88DE-7A10705ADD0A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encoder_lib", "encoder_lib\encoder_lib.vcxproj", "{97C34996-F458-4030-A402-B32C581872F1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_transcoding", "example_transcoding\example_transcoding.vcxproj", "{13333092-FCFE-4D74-8E76-F10C6037593C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_capi", "example_capi\example_capi.vcxproj", "{BE889347-E4FD-47DD-BBF4-81F98FAA8BA9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64EC = Debug|ARM64EC
Expand Down Expand Up @@ -55,6 +59,30 @@ Global
{97C34996-F458-4030-A402-B32C581872F1}.Release|x64.Build.0 = Release|x64
{97C34996-F458-4030-A402-B32C581872F1}.Release|x86.ActiveCfg = Release|Win32
{97C34996-F458-4030-A402-B32C581872F1}.Release|x86.Build.0 = Release|Win32
{13333092-FCFE-4D74-8E76-F10C6037593C}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC
{13333092-FCFE-4D74-8E76-F10C6037593C}.Debug|ARM64EC.Build.0 = Debug|ARM64EC
{13333092-FCFE-4D74-8E76-F10C6037593C}.Debug|x64.ActiveCfg = Debug|x64
{13333092-FCFE-4D74-8E76-F10C6037593C}.Debug|x64.Build.0 = Debug|x64
{13333092-FCFE-4D74-8E76-F10C6037593C}.Debug|x86.ActiveCfg = Debug|Win32
{13333092-FCFE-4D74-8E76-F10C6037593C}.Debug|x86.Build.0 = Debug|Win32
{13333092-FCFE-4D74-8E76-F10C6037593C}.Release|ARM64EC.ActiveCfg = Release|ARM64EC
{13333092-FCFE-4D74-8E76-F10C6037593C}.Release|ARM64EC.Build.0 = Release|ARM64EC
{13333092-FCFE-4D74-8E76-F10C6037593C}.Release|x64.ActiveCfg = Release|x64
{13333092-FCFE-4D74-8E76-F10C6037593C}.Release|x64.Build.0 = Release|x64
{13333092-FCFE-4D74-8E76-F10C6037593C}.Release|x86.ActiveCfg = Release|Win32
{13333092-FCFE-4D74-8E76-F10C6037593C}.Release|x86.Build.0 = Release|Win32
{BE889347-E4FD-47DD-BBF4-81F98FAA8BA9}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC
{BE889347-E4FD-47DD-BBF4-81F98FAA8BA9}.Debug|ARM64EC.Build.0 = Debug|ARM64EC
{BE889347-E4FD-47DD-BBF4-81F98FAA8BA9}.Debug|x64.ActiveCfg = Debug|x64
{BE889347-E4FD-47DD-BBF4-81F98FAA8BA9}.Debug|x64.Build.0 = Debug|x64
{BE889347-E4FD-47DD-BBF4-81F98FAA8BA9}.Debug|x86.ActiveCfg = Debug|Win32
{BE889347-E4FD-47DD-BBF4-81F98FAA8BA9}.Debug|x86.Build.0 = Debug|Win32
{BE889347-E4FD-47DD-BBF4-81F98FAA8BA9}.Release|ARM64EC.ActiveCfg = Release|ARM64EC
{BE889347-E4FD-47DD-BBF4-81F98FAA8BA9}.Release|ARM64EC.Build.0 = Release|ARM64EC
{BE889347-E4FD-47DD-BBF4-81F98FAA8BA9}.Release|x64.ActiveCfg = Release|x64
{BE889347-E4FD-47DD-BBF4-81F98FAA8BA9}.Release|x64.Build.0 = Release|x64
{BE889347-E4FD-47DD-BBF4-81F98FAA8BA9}.Release|x86.ActiveCfg = Release|Win32
{BE889347-E4FD-47DD-BBF4-81F98FAA8BA9}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
29 changes: 16 additions & 13 deletions external/basis_universal/basisu.vcxproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM64EC">
Expand Down Expand Up @@ -36,40 +36,40 @@
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down Expand Up @@ -129,7 +129,7 @@
<OpenMPSupport>true</OpenMPSupport>
<AdditionalIncludeDirectories>OpenCL</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);BASISU_SUPPORT_SSE=1;BASISU_SUPPORT_OPENCL=1;_HAS_EXCEPTIONS=0</PreprocessorDefinitions>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
Expand All @@ -147,9 +147,9 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<OpenMPSupport>true</OpenMPSupport>
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);BASISU_SUPPORT_SSE=1;BASISU_SUPPORT_OPENCL=1;</PreprocessorDefinitions>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<WarningLevel>Level4</WarningLevel>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<LanguageStandard>stdcpp17</LanguageStandard>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down Expand Up @@ -186,7 +186,7 @@
<PreprocessorDefinitions>NDEBUG;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions);BASISU_SUPPORT_SSE=1;BASISU_SUPPORT_OPENCL=1</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<ExceptionHandling>false</ExceptionHandling>
<OmitFramePointers>true</OmitFramePointers>
Expand Down Expand Up @@ -217,7 +217,7 @@
<FloatingPointModel>Precise</FloatingPointModel>
<OmitFramePointers>true</OmitFramePointers>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<SDLCheck>false</SDLCheck>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
Expand Down Expand Up @@ -266,7 +266,10 @@
<Project>{97c34996-f458-4030-a402-b32c581872f1}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClInclude Include="basisu_tool_help.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
7 changes: 5 additions & 2 deletions external/basis_universal/basisu.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="basisu_tool.cpp" />
</ItemGroup>
<ItemGroup>
<Manifest Include="basisu.manifest" />
</ItemGroup>
</Project>
<ItemGroup>
<ClInclude Include="basisu_tool_help.h" />
</ItemGroup>
</Project>
Loading
Loading