Merge branch 'love2d:main' into sdf-font-hintingmode

This commit is contained in:
Labrium
2024-06-22 13:20:46 -06:00
committed by GitHub
839 changed files with 51659 additions and 31550 deletions
+395 -59
View File
@@ -2,8 +2,14 @@ name: continuous-integration
on: [push, pull_request]
jobs:
linux-os:
runs-on: ubuntu-20.04
Linux:
runs-on: ubuntu-22.04
permissions:
checks: write
pull-requests: write
env:
ALSOFT_CONF: love2d-${{ github.sha }}/testing/resources/alsoft.conf
DISPLAY: :99
steps:
- name: Update APT
run: sudo apt-get update
@@ -15,14 +21,16 @@ jobs:
libxfixes-dev libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev \
libgl1-mesa-dev libdbus-1-dev libudev-dev libgles2-mesa-dev \
libegl1-mesa-dev libibus-1.0-dev fcitx-libs-dev libsamplerate0-dev \
libsndio-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev
libsndio-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev \
libcurl4-openssl-dev libfuse2 wmctrl openbox mesa-vulkan-drivers \
libvulkan1 vulkan-tools vulkan-validationlayers
- name: Checkout love-appimage-source
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: love2d/love-appimage-source
ref: 12.x
- name: Checkout LÖVE
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: love2d-${{ github.sha }}
- name: Get Dependencies for AppImage
@@ -39,25 +47,115 @@ jobs:
run: make LOVE_BRANCH=${{ github.sha }}
- name: Print LuaJIT branch
run: git -C LuaJIT-v2.1 branch -v
# start xvfb for test running
- name: Start xvfb and openbox
run: |
echo "Starting XVFB on $DISPLAY"
Xvfb $DISPLAY -screen 0, 360x240x24 &
echo "XVFBPID=$!" >> $GITHUB_ENV
# wait for xvfb to startup (3s is the same amount xvfb-run waits by default)
sleep 3
openbox &
echo "OPENBOXPID=$!" >> $GITHUB_ENV
# linux opengl tests
- name: Run Test Suite (opengl)
run: |
chmod a+x love-${{ github.sha }}.AppImage
./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --all --isRunner --renderers opengl
- name: Love Test Report (opengl)
id: report1
uses: ellraiser/love-test-report@main
with:
name: Love Testsuite Linux
title: test-report-linux-opengl
path: love2d-${{ github.sha }}/testing/output/lovetest_all.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Zip Test Output (opengl)
run: |
7z a -tzip test-output-linux-opengl.zip love2d-${{ github.sha }}/testing/output/
- name: Artifact Test Output (opengl)
uses: actions/upload-artifact@v4
with:
name: test-output-linux-opengl-${{ steps.report1.outputs.conclusion }}
path: test-output-linux-opengl.zip
# linux opengles tests
- name: Run Test Suite (opengles)
env:
LOVE_GRAPHICS_DEBUG: 1
run: |
export LOVE_GRAPHICS_USE_OPENGLES=1
./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --all --isRunner --renderers opengl
- name: Love Test Report (opengles)
uses: ellraiser/love-test-report@main
id: report2
with:
name: Love Testsuite Linux
title: test-report-linux-opengles
path: love2d-${{ github.sha }}/testing/output/lovetest_all.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Zip Test Output (opengles)
run: |
7z a -tzip test-output-linux-opengles.zip love2d-${{ github.sha }}/testing/output/
- name: Artifact Test Output (opengles)
uses: actions/upload-artifact@v4
with:
name: test-output-linux-opengles-${{ steps.report2.outputs.conclusion }}
path: test-output-linux-opengles.zip
# # linux vulkan tests
# - name: Run Test Suite (vulkan)
# env:
# LOVE_GRAPHICS_DEBUG: 1
# run: |
# ./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --all --isRunner --renderers vulkan
# - name: Love Test Report (vulkan)
# uses: ellraiser/love-test-report@main
# with:
# name: Love Testsuite Linux
# title: test-report-linux-vulkan
# path: love2d-${{ github.sha }}/testing/output/lovetest_all.md
# - name: Zip Test Output (vulkan)
# run: |
# 7z a -tzip test-output-linux-vulkan.zip love2d-${{ github.sha }}/testing/output/
# - name: Artifact Test Output (vulkan)
# uses: actions/upload-artifact@v4
# with:
# name: test-output-linux-vulkan
# path: test-output-linux-vulkan.zip
- name: Stop xvfb and openbox
# should always stop xvfb and openbox even if other steps failed
if: always()
run: |
kill $XVFBPID
kill $OPENBOXPID
- name: Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: love-linux-x86_64.AppImage
path: love-${{ github.sha }}.AppImage
- name: Artifact Debug Symbols
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: love-x86_64-AppImage-debug
path: love-${{ github.sha }}.AppImage-debug.tar.gz
windows-os:
- name: Check Tests Passing
if: steps.report1.outputs.conclusion == 'failure' || steps.report2.outputs.conclusion == 'failure'
run: |
echo "${{ steps.report1.outputs.failed }} opengl tests failed"
echo "${{ steps.report2.outputs.failed }} opengles tests failed"
exit 1
Windows:
runs-on: windows-latest
permissions:
checks: write
pull-requests: write
env:
ALSOFT_CONF: megasource/libs/love/testing/resources/alsoft.conf
VK_ICD_FILENAMES: ${{ github.workspace }}\mesa\x64\lvp_icd.x86_64.json
VULKAN_SDK: C:/VulkanSDK/1.3.231.1
strategy:
matrix:
platform: [Win32, x64, ARM64]
install: [compat, modern]
exclude:
- platform: ARM64
install: compat
platform: [x64, ARM64]
defaults:
run:
shell: cmd
@@ -66,17 +164,8 @@ jobs:
- name: Define Variables
id: vars
run: |
rem Compat/Modern switch
if "${{ matrix.install }}" == "compat" (
echo moredef=-DLOVE_INSTALL_UCRT=ON>> "%GITHUB_OUTPUT%"
echo compatname=-compat>> "%GITHUB_OUTPUT%"
) else (
echo moredef=>> "%GITHUB_OUTPUT%"
echo compatname=>> "%GITHUB_OUTPUT%"
)
rem JIT Modules
if "${{ matrix.platform }}-${{ matrix.install }}" == "x64-modern" (
if "${{ matrix.platform }}" == "x64" (
(echo jitmodules=1)>> "%GITHUB_OUTPUT%"
) else (
(echo jitmodules=0)>> "%GITHUB_OUTPUT%"
@@ -104,31 +193,32 @@ jobs:
echo nofiles=ignore>> "%GITHUB_OUTPUT%"
echo moredef=-DLOVE_EXTRA_DLLS=%CD%\angle\libEGL.dll;%CD%\angle\libGLESv2.dll>> "%GITHUB_OUTPUT%"
exit /b 0
- name: Download Windows SDK Setup 10.0.20348
run: curl -Lo winsdksetup.exe https://go.microsoft.com/fwlink/?linkid=2164145
- name: Install Debugging Tools for Windows
id: windbg
- name: Download pdbstr
run: curl -Lfo pdbstr.nupkg https://www.nuget.org/api/v2/package/Microsoft.Debugging.Tools.PdbStr/20230731.1609.0
- name: Download srctool
run: curl -Lfo srctool.nupkg https://www.nuget.org/api/v2/package/Microsoft.Debugging.Tools.SrcTool/20230731.1609.0
- name: Extract Tools and Add to PATH
run: |
setlocal enabledelayedexpansion
start /WAIT %CD%\winsdksetup.exe /features OptionId.WindowsDesktopDebuggers /q /log %CD%\log.txt
echo ERRORLEVEL=!ERRORLEVEL! >> %GITHUB_OUTPUT%
- name: Print Debugging Tools Install Log
if: always()
run: |
type log.txt
exit /b ${{ steps.windbg.outputs.ERRORLEVEL }}
mkdir debugtools
cd debugtools
if errorlevel 1 exit /b 1
7z e ..\srctool.nupkg content/amd64/srctool.exe
if errorlevel 1 exit /b 1
7z e ..\pdbstr.nupkg content/amd64/pdbstr.exe
if errorlevel 1 exit /b 1
echo %CD%>>%GITHUB_PATH%
- name: Setup Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Download source_index.py
run: curl -Lo source_index.py https://gist.github.com/MikuAuahDark/d9c099f5714e09a765496471c2827a55/raw/df34956052035f3473c5f01861dfb53930d06843/source_index.py
run: curl -Lfo source_index.py https://gist.github.com/MikuAuahDark/d9c099f5714e09a765496471c2827a55/raw/df34956052035f3473c5f01861dfb53930d06843/source_index.py
- name: Clone Megasource
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: megasource
repository: love2d/megasource
ref: 12.x
ref: main
- id: megasource
name: Get Megasource Commit SHA
shell: python
@@ -140,11 +230,11 @@ jobs:
commit = result.stdout.split()[0]
with open(os.environ["GITHUB_OUTPUT"], "w", encoding="UTF-8") as f: f.write(f"commit={commit}")
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: megasource/libs/love
- name: Download ANGLE
uses: robinraju/release-downloader@v1.7
uses: robinraju/release-downloader@v1.9
if: steps.vars.outputs.angle == '1'
with:
repository: MikuAuahDark/angle-winbuild
@@ -157,19 +247,19 @@ jobs:
if: steps.vars.outputs.angle == '1'
working-directory: angle
run: 7z x angle-win-${{ steps.vars.outputs.arch }}.zip
- name: Delete Strawbery Perl
- name: Remove Strawbery Perl From Path
# https://github.com/actions/runner-images/issues/6627
# In particular, this is not pretty, but even CMAKE_IGNORE_PREFIX_PATH
# cannot help in this case. Delete the whole folder!
# cannot help in this case.
run: |
rmdir /s /q C:\Strawberry
move /y C:\Strawberry C:\Strawberry_not_in_PATH
exit /b 0
- name: Configure
env:
CFLAGS: /Zi
CXXFLAGS: /Zi
LDFLAGS: /DEBUG:FULL /OPT:REF /OPT:ICF
run: cmake -Bbuild -Smegasource -T v142 -A ${{ matrix.platform }} --install-prefix %CD%\install -DCMAKE_PDB_OUTPUT_DIRECTORY=%CD%\pdb ${{ steps.vars.outputs.moredef }}
run: cmake -Bbuild -Smegasource -T v143 -A ${{ matrix.platform }} --install-prefix %CD%\install -DCMAKE_PDB_OUTPUT_DIRECTORY=%CD%\pdb ${{ steps.vars.outputs.moredef }}
- name: Install
run: cmake --build build --target PACKAGE --config Release -j2
- name: Copy LuaJIT lua51.pdb
@@ -187,35 +277,150 @@ jobs:
--source %CD%\build\libs\LuaJIT https://raw.githubusercontent.com/love2d/megasource/${{ steps.megasource.outputs.commit }}/libs/LuaJIT ^
pdb\Release\*.pdb
- name: Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}
name: love-windows-${{ steps.vars.outputs.arch }}
path: |
build/*.zip
build/*.exe
if-no-files-found: ${{ steps.vars.outputs.nofiles }}
- name: Artifact JIT Modules
if: steps.vars.outputs.jitmodules == '1'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: love-windows-jitmodules
path: build/libs/LuaJIT/src/jit/*.lua
- name: Artifact PDB
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-dbg
name: love-windows-${{ steps.vars.outputs.arch }}-dbg
path: pdb/Release/*.pdb
# install mesa for graphic tests
- name: Install Mesa
if: steps.vars.outputs.arch != 'ARM64'
run: |
curl -L --output mesa.7z --url https://github.com/pal1000/mesa-dist-win/releases/download/23.2.1/mesa3d-23.2.1-release-msvc.7z
7z x mesa.7z -o*
powershell.exe mesa\systemwidedeploy.cmd 1
# build love to use for the tests
- name: Build Test Exe
if: steps.vars.outputs.arch != 'ARM64'
run: cmake --build build --config Release --target install
# windows opengl tests
- name: Run Tests (opengl)
if: steps.vars.outputs.arch != 'ARM64'
env:
LOVE_GRAPHICS_DEBUG: 1
run: |
echo 'check dir'
ls
powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --all --isRunner --renderers opengl
- name: Love Test Report (opengl)
id: report1
if: steps.vars.outputs.arch != 'ARM64'
uses: ellraiser/love-test-report@main
with:
name: Love Testsuite Windows ${{ steps.vars.outputs.arch }} (opengl)
title: test-report-windows-${{ steps.vars.outputs.arch }}-opengl
path: megasource/libs/love/testing/output/lovetest_all.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Zip Test Output (opengl)
if: steps.vars.outputs.arch != 'ARM64'
run: |
7z a -tzip test-output-windows-${{ steps.vars.outputs.arch }}-opengl.zip megasource/libs/love/testing/output/
- name: Artifact Test Output (opengl)
if: steps.vars.outputs.arch != 'ARM64'
uses: actions/upload-artifact@v4
with:
name: test-output-windows-${{ steps.vars.outputs.arch }}-opengl-${{ steps.report1.outputs.conclusion }}
path: test-output-windows-${{ steps.vars.outputs.arch }}-opengl.zip
# windows opengles tests
- name: Run Tests (opengles)
if: steps.vars.outputs.arch != 'ARM64'
env:
LOVE_GRAPHICS_DEBUG: 1
LOVE_GRAPHICS_USE_OPENGLES: 1
run: |
powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --all --isRunner --renderers opengl
- name: Love Test Report (opengles)
id: report2
if: steps.vars.outputs.arch != 'ARM64'
uses: ellraiser/love-test-report@main
with:
name: Love Testsuite Windows ${{ steps.vars.outputs.arch }} (opengles)
title: test-report-windows-${{ steps.vars.outputs.arch }}-opengles
path: megasource/libs/love/testing/output/lovetest_all.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Zip Test Output (opengles)
if: steps.vars.outputs.arch != 'ARM64'
run: |
7z a -tzip test-output-windows-${{ steps.vars.outputs.arch }}-opengles.zip megasource/libs/love/testing/output/
- name: Artifact Test Output (opengles)
if: steps.vars.outputs.arch != 'ARM64'
uses: actions/upload-artifact@v4
with:
name: test-output-windows-${{ steps.vars.outputs.arch }}-opengles-${{ steps.report2.outputs.conclusion }}
path: test-output-windows-${{ steps.vars.outputs.arch }}-opengles.zip
- name: Check Tests Passing
if: steps.report1.outputs.conclusion == 'failure' || steps.report2.outputs.conclusion == 'failure'
run: |
echo "${{ steps.report1.outputs.failed }} opengl tests failed"
echo "${{ steps.report2.outputs.failed }} opengles tests failed"
exit 1
# # install vulkan
# - name: Install Vulkan
# if: steps.vars.outputs.arch != 'ARM64'
# run: |
# curl -L --show-error --output VulkanSDK.exe https://sdk.lunarg.com/sdk/download/1.3.231.1/windows/VulkanSDK-1.3.231.1-Installer.exe
# ./VulkanSDK.exe --root C:/VulkanSDK/1.3.231.1 --accept-licenses --default-answer --confirm-command install com.lunarg.vulkan.core com.lunarg.vulkan.vma
# curl -L --show-error --output vulkan-runtime.zip https://sdk.lunarg.com/sdk/download/1.3.231.1/windows/vulkan-runtime-components.zip
# 7z e vulkan-runtime.zip -o"C:/VulkanSDK/1.3.231.1/runtime/x64" */x64
# copy "C:/VulkanSDK/1.3.231.1/runtime/x64/vulkan-1.dll" "mesa/x64"
# copy "C:/VulkanSDK/1.3.231.1/runtime/x64/vulkan-1.dll" "C:/Windows/System32"
# copy "C:/VulkanSDK/1.3.231.1/runtime/x64/vulkan-1.dll" "love-12.0-win64/love-12.0-win64"
# reg add HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\Drivers /v "${{ github.workspace }}\mesa\x64\lvp_icd.x86_64.json" /t REG_DWORD /d 0
# powershell.exe C:/VulkanSDK/1.3.231.1/runtime/x64/vulkaninfo.exe --summary
# # windows vulkan tests
# - name: Run Tests (vulkan)
# if: steps.vars.outputs.arch != 'ARM64'
# env:
# LOVE_GRAPHICS_DEBUG: 1
# run: |
# powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --all --isRunner --renderers vulkan
# - name: Love Test Report (vulkan)
# if: steps.vars.outputs.arch != 'ARM64'
# uses: ellraiser/love-test-report@main
# with:
# name: Love Testsuite Windows ${{ steps.vars.outputs.arch }} (vulkan)
# title: test-report-windows-${{ steps.vars.outputs.arch }}-vulkan
# path: megasource/libs/love/testing/output/lovetest_all.md
# - name: Zip Test Output (vulkan)
# if: steps.vars.outputs.arch != 'ARM64'
# run: |
# 7z a -tzip test-output-windows-${{ steps.vars.outputs.arch }}-vulkan.zip megasource/libs/love/testing/output/
# - name: Artifact Test Output (vulkan)
# if: steps.vars.outputs.arch != 'ARM64'
# uses: actions/upload-artifact@v4
# with:
# name: test-output-windows-${{ steps.vars.outputs.arch }}-vulkan
# path: test-output-windows-${{ steps.vars.outputs.arch }}-vulkan.zip
macOS:
runs-on: macos-latest
permissions:
checks: write
pull-requests: write
env:
ALSOFT_CONF: testing/resources/alsoft.conf
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Clone Dependencies
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: apple-dependencies
repository: love2d/love-apple-dependencies
ref: 12.x
ref: main
- name: Move Dependencies
run:
mv apple-dependencies/macOS/Frameworks platform/xcode/macosx
@@ -229,24 +434,155 @@ jobs:
run:
ditto -c -k --sequesterRsrc --keepParent love-macos/love.app love-macos.zip
- name: Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: love-macos
path: love-macos.zip
# macos opengl tests
- name: Run Test Suite (OpenGL)
env:
LOVE_GRAPHICS_DEBUG: 1
run: |
ls
love-macos/love.app/Contents/MacOS/love ./testing/main.lua --all --isRunner --renderers opengl
- name: Love Test Report (OpenGL)
id: report1
uses: ellraiser/love-test-report@main
with:
name: Love Testsuite MacOS
title: test-report-macos-opengl
path: testing/output/lovetest_all.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Zip Test Output (OpenGL)
run: |
7z a -tzip test-output-macos-opengl.zip ./testing/output/
- name: Artifact Test Output (OpenGL)
uses: actions/upload-artifact@v4
with:
name: test-output-macos-opengl-${{ steps.report1.outputs.conclusion }}
path: test-output-macos-opengl.zip
- name: Check Tests Passing (OpenGL)
if: steps.report1.outputs.conclusion == 'failure'
run: |
echo "${{ steps.report1.outputs.failed }} opengl tests failed"
exit 1
# macos metal tests
- name: Run Test Suite (Metal)
env:
LOVE_GRAPHICS_DEBUG: 1
run: |
ls
love-macos/love.app/Contents/MacOS/love ./testing/main.lua --all --isRunner --renderers metal
- name: Love Test Report (Metal)
id: report2
uses: ellraiser/love-test-report@main
with:
name: Love Testsuite MacOS (Metal)
title: test-report-macos-metal
path: testing/output/lovetest_all.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Zip Test Output (Metal)
run: |
7z a -tzip test-output-macos-metal.zip ./testing/output/
- name: Artifact Test Output (Metal)
uses: actions/upload-artifact@v4
with:
name: test-output-macos-metal-${{ steps.report2.outputs.conclusion }}
path: test-output-macos-metal.zip
- name: Check Tests Passing (Metal)
if: steps.report2.outputs.conclusion == 'failure'
run: |
echo "${{ steps.report2.outputs.failed }} metal tests failed"
exit 1
iOS-Simulator:
runs-on: macos-latest
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Clone Dependencies
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: apple-dependencies
repository: love2d/love-apple-dependencies
ref: 12.x
ref: main
- name: Move Dependencies
run: |
mv apple-dependencies/iOS/libraries platform/xcode/ios
- name: Build
run:
xcodebuild -project platform/xcode/love.xcodeproj -scheme love-ios -configuration Release -destination 'platform=iOS Simulator,name=iPhone 11'
xcodebuild -project platform/xcode/love.xcodeproj -scheme love-ios -configuration Release -destination 'platform=iOS Simulator,name=iPhone 15'
Android:
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [Debug, Release]
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs='-Xmx4G'"
steps:
- name: Prepare Environment
run: sudo apt-get update && curl -Lfo kitware-archive.sh https://apt.kitware.com/kitware-archive.sh && sudo bash ./kitware-archive.sh
- name: Install Dependencies
run: sudo apt-get install ninja-build cmake
- name: Checkout love-android
uses: actions/checkout@v4
with:
repository: love2d/love-android
submodules: false
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: adopt-hotspot
java-version: 17
cache: gradle
- name: Clone Megasource
uses: actions/checkout@v4
with:
path: app/src/main/cpp/megasource
repository: love2d/megasource
ref: main
- name: Checkout
uses: actions/checkout@v4
with:
path: app/src/main/cpp/love
- name: Build Normal Flavor
run: bash ./gradlew assembleNormalRecord${{ matrix.build_type }}
- name: Build Release-specific Binaries
if: ${{ matrix.build_type == 'Release' }}
run: bash ./gradlew bundleNormalNoRecordRelease bundleEmbedRecordRelease bundleEmbedNoRecordRelease
- name: Artifact (Normal debug APK)
if: ${{ matrix.build_type == 'Debug' }}
uses: actions/upload-artifact@v4
with:
name: love-android-debug.apk
path: app/build/outputs/apk/normalRecord/debug/app-normal-record-debug.apk
- name: Artifact (Normal unsigned APK)
if: ${{ matrix.build_type == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: love-android.apk
path: app/build/outputs/apk/normalRecord/release/app-normal-record-release-unsigned.apk
- name: Artifact (Normal AAB w/o recording)
if: ${{ matrix.build_type == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: love-android-ps.aab
path: app/build/outputs/bundle/normalNoRecordRelease/app-normal-noRecord-release.aab
- name: Artifact (Embed AAB)
if: ${{ matrix.build_type == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: love-android-embed-record.aab
path: app/build/outputs/bundle/embedRecordRelease/app-embed-record-release.aab
- name: Artifact (Embed AAB w/o recording)
if: ${{ matrix.build_type == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: love-android-embed.aab
path: app/build/outputs/bundle/embedNoRecordRelease/app-embed-noRecord-release.aab
- name: Artifact (Debug symbols)
uses: actions/upload-artifact@v4
with:
name: love-android-unstripped-debugsyms-${{ matrix.build_type }}
path: app/build/intermediates/cxx
+5
View File
@@ -69,3 +69,8 @@ stamp-h1
/src/tags
.vs/
.vscode/
/testing/output/*.xml
/testing/output/*.html
/testing/output/*.md
/testing/output/actual/*.png
/testing/output/difference/*.png
+659 -641
View File
File diff suppressed because it is too large Load Diff
+24 -5
View File
@@ -68,7 +68,8 @@ Released: N/A
* Added APIs to override the default orthographic projection: love.graphics.setOrthoProjection, setPerspectiveProjection, and resetProjection.
* Added ability to set point size within a vertex shader by setting the 'love_PointSize' variable.
* Added love.graphics.setBlendState, which gives lower level control over blend operations than setBlendMode.
* Added love.graphics.setStencilMode and getStencilMode. Replaces love.graphics.stencil as well as setStencilTest.
* Added high level love.graphics.setStencilMode and getStencilMode functions. Replaces love.graphics.stencil and setStencilTest.
* Added lower level love.graphics.setStencilState and getStencilState functions.
* Added a variant of love.graphics.setColorMask which accepts a single boolean.
* Added new 'clampone' wrap mode.
* Added 'clampone', 'texelbuffer', 'indexbuffer32bit', 'mipmaprange', and 'indirectdraw' graphics feature enums.
@@ -81,7 +82,6 @@ Released: N/A
* Added love.joysticksensorupdated callback.
* Added variant for enet peer:send and host:broadcast which accepts a pointer (light userdata) and a size.
* Changed love.filesystem.exists to no longer be deprecated.
* Changed the default font from Vera size 12 to Noto Sans size 13.
* Changed TrueType and OpenType font handling to have improved kerning and character combining support.
* Changed the Texture class and implementation to no longer have separate Canvas and Image subclasses.
@@ -100,6 +100,7 @@ Released: N/A
* Changed RevoluteJoint:getMotorTorque and WheelJoint:getMotorTorque to take 'dt' as a parameter instead of 'inverse_dt'.
* Changed love.math.perlinNoise and simplexNoise to use higher precision numbers for its internal calculations.
* Changed t.accelerometerjoystick startup flag in love.conf to unset by default.
* Changed love.data.hash to take in a container type.
* Renamed 'display' field to 'displayindex' in love.window.setMode/updateMode/getMode and love.conf.
* Renamed love.graphics Text objects to TextBatch.
@@ -113,12 +114,13 @@ Released: N/A
* Deprecated love.graphics.setNewFont (use love.graphics.newFont and love.graphics.setFont instead).
* Deprecated love.graphics.newText (renamed to love.graphics.newTextBatch).
* Deprecated love.graphics.getImageFormats and love.graphics.getCanvasFormats (replaced by getTextureFormats).
* Deprecated love.graphics.stencil (replaced by love.graphics.setStencilMode).
* Deprecated love.graphics.setStencilTest and love.graphics.getStencilTest (replaced by love.graphics.setStencilMode and getStencilMode).
* Deprecated love.graphics.stencil (replaced by love.graphics.setStencilMode or love.graphics.setStencilState).
* Deprecated love.graphics.setStencilTest and love.graphics.getStencilTest (replaced by love.graphics.setStencilMode or setStencilState).
* Deprecated t.window.highdpi in love.conf and the highdpi flag of love.window.setMode (replaced by t.highdpi in love.conf).
* Deprecated t.accelerometerjoystick in love.conf (replaced by love.sensor module).
* Deprecated the variants of Mesh:attachAttribute and SpriteBatch:attachAttribute which accept a Mesh (replaced by variants which accept a Buffer).
* Deprecated Texture:newImageData (replaced by love.graphics.readbackTexture).
* Deprecated love.data.hash (replaced by function variant, which takes container type).
* Removed the variant of SpriteBatch:setColor() which turns off all previously set colors.
* Removed the no-argument variant of love.graphics.setColorMask.
@@ -145,13 +147,30 @@ Released: N/A
LOVE 11.5 [Mysterious Mysteries]
--------------------------------
Released: N/A
Released: 2023-12-03
* Added "LÖVE Loader" launcher on Android for easier loading of .love files.
* Changed iOS game selector to alphabetically sort the list of .love files.
* Changed JIT compilation on macOS arm64 (Apple Silicon) to be off by default, since performance and available JIT memory isn't reliable.
* Fixed inconsistent and buggy behaviour of 'pairs' by updating LuaJIT.
* Fixed "unexpected alignment" errors when running love on some 32 bit Linux systems.
* Fixed running fused games on Windows when the executable has been code-signed.
* Fixed undefined behaviour in love.data.hash's implementation.
* Fixed writing files when a symlink exists in the save directory's path.
* Fixed love.threaderror not being called if the error message is an empty string.
* Fixed a race condition when a Thread is destroyed immediately after Thread:start.
* Fixed unexpectedly slow first frames on macOS.
* Fixed love.joystick.setGamepadMapping when replacing an existing mapping.
* Fixed love.joystick.getGamepadMappingString.
* Fixed duplicate platform fields in love.joystick.saveGamepadMappings.
* Fixed DistanceJoint type information.
* Fixed time drift in Source:tell after a Source loops.
* Fixed audio not always pausing when the app is minimized on Android.
* Fixed RecordingDevice:start to return false instead of hard-crashing on iOS.
* Fixed identical frames in Ogg Theora videos being skipped.
* Fixed love.font.newBMFontRasterizer's single file parameter variant.
* Fixed the original window size not always being restored when exiting fullscreen on Linux.
* Fixed some cases of framerate hitches in Windows when vsync is enabled in windowed mode.
* Fixed colors appearing over-saturated on P3 displays in macOS.
-25
View File
@@ -1,25 +0,0 @@
# Sets the following variables:
#
# MPG123_FOUND
# MPG123_INCLUDE_DIR
# MPG123_LIBRARY
set(MPG123_SEARCH_PATHS
/usr/local
/usr
)
find_path(MPG123_INCLUDE_DIR
NAMES mpg123.h
PATH_SUFFIXES include
PATHS ${MPG123_SEARCH_PATHS})
find_library(MPG123_LIBRARY
NAMES mpg123
PATH_SUFFIXES lib
PATHS ${MPG123_SEARCH_PATHS})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MPG123 DEFAULT_MSG MPG123_LIBRARY MPG123_INCLUDE_DIR)
mark_as_advanced(MPG123_INCLUDE_DIR MPG123_LIBRARY)
-28
View File
@@ -1,28 +0,0 @@
# FindOpenAL.cmake that comes with CMake expects "#include <al.h>" to be used
# However, we use "#include <AL/al.h>"
# Sets the following variables:
#
# OPENAL_FOUND
# OPENAL_INCLUDE_DIR
# OPENAL_LIBRARY
set(OPENAL_SEARCH_PATHS
/usr/local
/usr
)
find_path(OPENAL_INCLUDE_DIR
NAMES AL/al.h
PATH_SUFFIXES include
PATHS ${OPENAL_SEARCH_PATHS})
find_library(OPENAL_LIBRARY
NAMES openal
PATH_SUFFIXES lib
PATHS ${OPENAL_SEARCH_PATHS})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
mark_as_advanced(OPENAL_INCLUDE_DIR OPENAL_LIBRARY)
+33
View File
@@ -0,0 +1,33 @@
# Group all related stuff in folders in Visual Studio
function(love_group_projects)
set(options NESTED)
set(oneValueArgs NAME)
set(multiValueArgs TARGETS)
cmake_parse_arguments(LOVE_GROUP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
foreach(TARGET_NAME ${LOVE_GROUP_TARGETS})
if (TARGET ${TARGET_NAME})
get_target_property(TARGET_TYPE ${TARGET_NAME} TYPE)
# If this is an interface target, walk the children
if (${TARGET_TYPE} STREQUAL "INTERFACE_LIBRARY")
get_target_property(TARGET_LIBS ${TARGET_NAME} INTERFACE_LINK_LIBRARIES)
foreach(TARGET_LIB ${TARGET_LIBS})
# Is this a target? (Could also be a .lib file)
if (TARGET ${TARGET_LIB})
# Do we want to nest per-project?
if (LOVE_GROUP_NESTED)
set_target_properties(${TARGET_LIB} PROPERTIES FOLDER "${LOVE_GROUP_NAME}/${TARGET_NAME}")
else()
set_target_properties(${TARGET_LIB} PROPERTIES FOLDER "${LOVE_GROUP_NAME}")
endif()
endif()
endforeach()
else()
# This is no interface library, so group it under the root 'NAME' node
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "${LOVE_GROUP_NAME}")
endif()
endif()
endforeach()
endfunction()
Binary file not shown.
+1 -1
View File
@@ -6,7 +6,7 @@ This distribution contains code from the following projects (full license text b
- LOVE
Website: https://love2d.org/
License: zlib
Copyright (c) 2006-2023 LOVE Development Team
Copyright (c) 2006-2024 LOVE Development Team
- ENet
Website: http://enet.bespin.org/index.html
-24
View File
@@ -1,24 +0,0 @@
ACLOCAL_AMFLAGS = -I platform/unix/m4
SUBDIRS = src
EXTRA_DIST = changes.txt license.txt readme.md \
platform/unix/love.desktop.in
dist_man1_MANS = platform/unix/love.6
applicationsdir=$(datarootdir)/applications
mimeinfodir=$(datarootdir)/mime/packages
pixmapsdir=$(datarootdir)/pixmaps
mimeiconsdir=$(datarootdir)/icons/hicolor/scalable/mimetypes
applications_DATA = platform/unix/love.desktop
dist_mimeinfo_DATA = platform/unix/love.xml
dist_pixmaps_DATA = platform/unix/love.svg
dist_mimeicons_DATA = platform/unix/application-x-love-game.svg
platform/unix/love.desktop: platform/unix/love.desktop.in
$(MKDIR_P) platform/unix
rm -f $@ $@.tmp
$(SED) \
-e "s|@bindir[@]|$(bindir)|" \
${srcdir}/$@.in > $@.tmp
chmod a-w $@.tmp
mv $@.tmp $@
-71
View File
@@ -1,71 +0,0 @@
#!/bin/bash
log() {
echo "[automagic] " $@
}
die() {
log "Fatal: "$@
exit 1
}
if [[ ! -d platform/unix ]]; then
log "Can't find the 'plaform/unix' folder, make sure you run this from the root of the repository."
exit 1
fi
AUTOHEADER=${AUTOHEADER:-$(which autoheader)}
AUTOCONF=${AUTOCONF:-$(which autoconf)}
LIBTOOLIZE=${LIBTOOLIZE:-$(which libtoolize)}
ACLOCAL=${ACLOCAL:-$(which aclocal)}
AUTOMAKE=${AUTOMAKE:-$(which automake)}
[[ -x ${AUTOHEADER} ]] || die "Could not find autoheader. Install autoconf."
[[ -x ${AUTOCONF} ]] || die "Could not find autoconf."
[[ -x ${LIBTOOLIZE} ]] || die "Could not find libtoolize. Install libtool."
[[ -x ${ACLOCAL} ]] || die "Could not find aclocal. Install automake."
[[ -x ${AUTOMAKE} ]] || die "Could not find automake."
print_errors() {
local output
output="$("$@" 2>&1)" && return 0
printf "%s\n" "$output"
return 1
}
automagic() {
log "Copying files..."
cp platform/unix/configure.ac .
cp platform/unix/Makefile.am .
log "Running genmodules..."
if ! print_errors bash platform/unix/genmodules "$1"; then
echo "You should be doing this from the root directory of the project."
exit 1
fi
log "Running autoheader..."
print_errors ${AUTOHEADER} || return 1 # Gimmie config.h.in
log "Running libtoolize..."
print_errors ${LIBTOOLIZE} --force || return 1
log "Running aclocal..."
print_errors ${ACLOCAL} || return 1
log "Running autoconf..."
print_errors ${AUTOCONF} || return 1
log "Running automake..."
print_errors ${AUTOMAKE} -a || return 1
}
automagic "$@"
if [[ $? -eq 1 ]]; then
log "Failed, sadface."
log "This is generally a configuration error (I'm looking at you aclocal)"
exit 1
else
log "Success, carry on configuring."
fi
-140
View File
@@ -1,140 +0,0 @@
AC_INIT([love], [12.0])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([platform/unix])
AC_CONFIG_MACRO_DIR([platform/unix/m4])
AC_CONFIG_SRCDIR([src/love.cpp])
AM_INIT_AUTOMAKE([foreign -Wall foreign tar-ustar silent-rules])
AM_SILENT_RULES
AC_PREFIX_DEFAULT([/usr])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
LT_INIT([disable-static])
AC_PROG_CC
AC_PROG_CXX
AC_PROG_SED
AC_PROG_MKDIR_P
AC_PROG_OBJCXX
PKG_PROG_PKG_CONFIG
AC_C_BIGENDIAN
AC_LANG([C++])
dnl Workaround for old aclocal versions
m4_include([platform/unix/cpp14.m4])
m4_include([platform/unix/deps.m4])
includes=
AC_DEFUN([LOVE_MSG_ERROR],
[AC_MSG_ERROR([LÖVE needs "$1"[,] please install "$1" with development files and try again])])
# C++14 support in cpp14.m4
ACLOVE_CPP14_TEST
# Add -fvisibility=hidden and -fvisibility-inlines-hidden
CFLAGS="-fvisibility=hidden $CFLAGS"
CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden $CXXFLAGS"
# Allow people on OSX to use autotools, they need their platform files
AC_ARG_ENABLE([osx],
AC_HELP_STRING([--enable-osx], [Compile platform-specific files for OSX]), [], [enable_osx=no])
AS_VAR_IF([enable_osx], [no], [], #else
ac_cv_search_glLoadIdentity="-framework OpenGL"
AC_SUBST([LDFLAGS], ["${LDFLAGS} -framework CoreFoundation -framework Cocoa"])
AC_SUBST([CPPFLAGS], ["${CPPFLAGS} -I../platform/macosx"]))
# stb_image sse2 override (https://github.com/nothings/stb/issues/280)
AC_ARG_ENABLE([stbi-sse2-override],
AC_HELP_STRING([--enable-stbi-sse2-override], [Force stb_image SSE2 support]), [], [enable_stbi_sse2_override=no])
AS_VAR_IF([enable_stbi_sse2_override], [no], [], #else
AC_SUBST([CPPFLAGS], ["${CPPFLAGS} -DLOVE_STBI_SSE2_OVERRIDE"]))
# --with-lua and --with-luaversion
AC_ARG_WITH([lua], [AS_HELP_STRING([--with-lua], [Select the lua implementation])],
[], [with_lua=luajit])
AC_ARG_WITH([luaversion], [AS_HELP_STRING([--with-luaversion], [Select the lua version])],
[], [with_luaversion=5.1])
with_clean_luaversion=`printf ${with_luaversion} | sed 's/\.//g'`
# Generated sources for enabling/disabling modules
m4_include([configure-modules-pre.ac])
# Dependencies we always use
ACLOVE_DEP_LUA
ACLOVE_DEP_SDL2
ACLOVE_DEP_LIBM
ACLOVE_DEP_ZLIB
ACLOVE_DEP_PTHREAD
# Conditional dependencies
AS_VAR_IF([enable_module_audio], [yes], [ACLOVE_DEP_OPENAL], [])
AS_VAR_IF([enable_module_font], [yes], [
ACLOVE_DEP_FREETYPE2
ACLOVE_DEP_HARFBUZZ
], [])
AS_VAR_IF([enable_module_sound], [yes], [
ACLOVE_DEP_LIBMODPLUG
ACLOVE_DEP_VORBISFILE
], [])
AS_VAR_IF([enable_module_video], [yes], [ACLOVE_DEP_THEORA], [])
# Add flags for optional libraries
AC_ARG_ENABLE([library-enet], [ --disable-library-enet Turn off library enet], [], [enable_library_enet=yes])
AC_ARG_ENABLE([library-luasocket], [ --disable-library-luasocket Turn off library luasocket], [], [enable_library_luasocket=yes])
AC_ARG_ENABLE([library-lua53], [ --disable-library-lua53 Turn off library lua53 (lua 5.3 backports, required by love.data)], [], [enable_library_lua53=yes])
AC_ARG_ENABLE([library-luahttps], [ --disable-library-luahttps Turn off library luahttps], [], [enable_library_luahttps=yes])
# Select the libraries we need to build, based on the selected modules
AS_VAR_IF([enable_module_filesystem], [yes], [enable_library_physfs=yes], [enable_library_physfs=no])
AS_VAR_IF([enable_module_physics], [yes], [enable_library_box2d=yes], [enable_library_box2d=no])
AS_VAR_IF([enable_module_image], [yes], [enable_library_ddsparse=yes], [enable_library_ddsparse=no])
AS_VAR_IF([enable_module_graphics], [yes], [enable_library_glad=yes], [enable_library_glad=no])
AS_VAR_IF([enable_module_graphics], [yes], [enable_library_spirv_cross=yes], [enable_library_spirv_cross=no])
AS_VAR_IF([enable_module_graphics], [yes], [enable_library_glslang=yes], [enable_library_glslang=no])
AS_VAR_IF([enable_module_image], [yes], [enable_library_lodepng=yes], [enable_library_lodepng=no])
AS_VAR_IF([enable_module_data], [yes], [enable_library_lua53=yes], [])
AS_VAR_IF([enable_module_math], [yes], [enable_library_lz4=yes], [enable_library_lz4=no])
AS_VAR_IF([enable_module_math], [yes], [enable_library_noise1234=yes], [enable_library_noise1234=no])
AS_VAR_IF([enable_module_image], [yes], [enable_library_stb=yes], [enable_library_stb=no])
AS_VAR_IF([enable_module_image], [yes], [enable_library_tinyexr=yes], [enable_library_tinyexr=no])
AS_VAR_IF([enable_module_sound], [yes], [enable_library_Wuff=yes], [enable_library_Wuff=no])
AS_VAR_IF([enable_module_graphics], [yes], [enable_library_xxHash=yes], [enable_library_xxHash=no])
# Utf8 is required by both graphics and font, so enable if either is enabled
enable_library_utf8=no
AS_VAR_IF([enable_module_graphics], [yes], [enable_library_utf8=yes], [])
AS_VAR_IF([enable_module_font], [yes], [enable_library_utf8=yes], [])
# libenet check for socklen_t
ACLOVE_SOCKLEN_T
# Generated sources for enabling/disabling modules
m4_include([configure-modules-post.ac])
# Optionally build the executable (default on)
AC_ARG_ENABLE([exe],
AC_HELP_STRING([--disable-exe], [Disable building of executable launcher]), [], [enable_exe=yes])
AS_VAR_IF([enable_exe], [no], [], #else
AC_DEFINE([LOVE_BUILD_EXE], [], [Skip building launcher]))
AM_CONDITIONAL([LOVE_BUILD_EXE], [test "x$enable_exe" != xno])
AM_CONDITIONAL([LOVE_TARGET_OSX], [test "x$enable_osx" != xno])
# Automatic script file rebuilding
AC_CHECK_PROGS([LUA_EXECUTABLE], ["${with_lua}${with_luaversion}" "${with_lua}" "lua"], [:])
AS_VAR_IF([LUA_EXECUTABLE], [:],
[AC_MSG_WARN([Did not find a lua executable, you may need to update the scripts manually if you change them])], [])
# Set our includes as automake variable
AC_SUBST([LOVE_INCLUDES], ["$includes"])
AC_CONFIG_FILES([
Makefile
src/Makefile
platform/unix/debian/control
platform/unix/debian/changelog
platform/unix/debian/rules
])
AC_OUTPUT
chmod 755 platform/unix/debian/rules
-68
View File
@@ -1,68 +0,0 @@
AC_DEFUN([ACLOVE_CXX_FLAG_TEST], [ dnl WARNING: NOT REENTRANT
aclove_cxx_flag_test_save_cflags="$CXXFLAGS"
CXXFLAGS="$1"
AC_MSG_CHECKING([whether $CXX supports flag $1])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]; $2,
[AC_MSG_RESULT([no]); $3])
CXXFLAGS="$aclove_cxx_flag_test_save_cflags"
])
AC_DEFUN([ACLOVE_GET_GCC_VERSION], [
aclove_gcc_version_found="yes"
AC_COMPUTE_INT(aclove_gcc_version_major, __GNUC__,, aclove_gcc_version_found="no")
AC_COMPUTE_INT(aclove_gcc_version_minor, __GNUC_MINOR__,, aclove_gcc_version_found="no")
AC_COMPUTE_INT(aclove_gcc_version_patch, __GNUC_PATCHLEVEL__,, aclove_gcc_version_found="no")
])
AC_DEFUN([ACLOVE_GET_CLANG_VERSION], [
aclove_clang_version_found="yes"
AC_COMPUTE_INT(aclove_clang_version_major, __clang_major__,, aclove_clang_version_found="no")
AC_COMPUTE_INT(aclove_clang_version_minor, __clang_minor__,, aclove_clang_version_found="no")
AC_COMPUTE_INT(aclove_clang_version_patch, __clang_patchlevel__,, aclove_clang_version_found="no")
])
AC_DEFUN([ACLOVE_CPP14_TEST_FLAG], [
aclove_cpp14_test_cxx14name="no"
ACLOVE_CXX_FLAG_TEST([-std=c++14], aclove_cpp14_test_cxx14name="c++14", [])
AS_VAR_IF([aclove_cpp14_test_cxx14name], [no],
[AC_MSG_ERROR([LÖVE needs a C++ compiler with C++14 support])],
[CXXFLAGS="$CXXFLAGS -std=$aclove_cpp14_test_cxx14name"])
])
AC_DEFUN([ACLOVE_CPP14_CHECK_VERSION], [ dnl compiler, targetmajor, targetminor, on-failure
aclove_cpp14_check_version_status="no"
AC_MSG_CHECKING([whether $1 version is at least $2.$3])
AS_IF([test "$aclove_[]$1[]_version_major" -gt $2], aclove_cpp14_check_version_status="yes")
AS_IF([test "$aclove_[]$1[]_version_major" -eq $2 && test "$aclove_[]$1[]_version_minor" -ge $3], aclove_cpp14_check_version_status="yes")
AC_MSG_RESULT([$aclove_cpp14_check_version_status])
AS_VAR_IF([aclove_cpp14_check_version_status], [no],
[$4])
])
AC_DEFUN([ACLOVE_CPP14_TEST_VERSION_GCC], [
ACLOVE_CPP14_CHECK_VERSION([gcc], 4, 9,
[AC_MSG_ERROR([LÖVE needs a GCC version of at least 4.9])])
])
AC_DEFUN([ACLOVE_CPP14_TEST_VERSION_CLANG], [
ACLOVE_CPP14_CHECK_VERSION([clang], 3, 4,
[AC_MSG_ERROR([LÖVE needs a clang version of at least 3.4])])
])
AC_DEFUN([ACLOVE_CPP14_TEST], [
ACLOVE_CPP14_TEST_FLAG
ACLOVE_GET_GCC_VERSION
ACLOVE_GET_CLANG_VERSION
# Since clang also sets gcc headers, check clang after
aclove_cpp14_test_compiler="unknown"
AS_VAR_IF([aclove_gcc_version_found], [yes], aclove_cpp14_test_compiler="gcc")
AS_VAR_IF([aclove_clang_version_found], [yes], aclove_cpp14_test_compiler="clang")
AS_CASE([$aclove_cpp14_test_compiler],
[gcc], [ACLOVE_CPP14_TEST_VERSION_GCC],
[clang], [ACLOVE_CPP14_TEST_VERSION_CLANG],
[AC_MSG_WARN([Could not determine compiler version])])
])
+2 -2
View File
@@ -1,5 +1,5 @@
love@LOVE_SUFFIX@ (11.2~pre3458ppa1) trusty; urgency=medium
@LOVE_EXE_NAME@ (@LOVE_VERSION_STR@ppa1) focal; urgency=medium
* Upstream testing release
-- Bart van Strien <bart.bes@gmail.com> Tue, 10 Jul 2018 19:22:30 +0200
-- Bart van Strien <bart.bes@gmail.com> @LOVE_CONFIGURE_TIMESTAMP@
+7 -9
View File
@@ -1,11 +1,9 @@
Source: love@LOVE_SUFFIX@
Source: @LOVE_EXE_NAME@
Section: games
Priority: extra
Maintainer: Bart van Strien <bart.bes@gmail.com>
Build-Depends: debhelper (>= 9),
dh-autoreconf,
pkg-config,
libtool,
cmake,
g++ (>= 4.7.0),
libfreetype6-dev,
libharfbuzz-dev,
@@ -22,7 +20,7 @@ Build-Depends: debhelper (>= 9),
Standards-Version: 3.9.5
Homepage: http://love2d.org
Package: liblove@LOVE_SUFFIX@0
Package: @LOVE_LIB_NAME@0
Section: libs
Architecture: any
Multi-Arch: same
@@ -32,20 +30,20 @@ Depends: ${misc:Depends},
Description: 2D game engine - runtime
LOVE is a free 2D game engine which enables easy game creation in Lua.
Package: love@LOVE_SUFFIX@
Package: @LOVE_EXE_NAME@
Architecture: any
Depends: ${misc:Depends},
${shlibs:Depends},
liblove@LOVE_SUFFIX@0 (= ${binary:Version})
@LOVE_LIB_NAME@0 (= ${binary:Version})
Description: 2D game engine
LOVE is a free 2D game engine which enables easy game creation in Lua.
Package: liblove@LOVE_SUFFIX@-dbg
Package: @LOVE_LIB_NAME@-dbg
Priority: extra
Section: debug
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
liblove@LOVE_SUFFIX@0 (= ${binary:Version})
@LOVE_LIB_NAME@0 (= ${binary:Version})
Description: 2D game engine - debug symbols
LOVE is a free 2D game engine which enables easy game creation in Lua.
+3 -11
View File
@@ -1,22 +1,14 @@
#!/usr/bin/make -f
commonflags = -Wall -Wno-maybe-uninitialized -Wno-strict-aliasing
CFLAGS += $(commonflags)
CXXFLAGS += $(commonflags)
%:
dh $@ --parallel --with autoreconf
dh $@ --parallel
override_dh_auto_clean:
dh_auto_clean
rm -f platform/unix/love-unstable.6
override_dh_auto_configure:
dh_auto_configure -- --with-lua=luajit
override_dh_installdocs:
dh_installdocs --link-doc=liblove@LOVE_SUFFIX@0
dh_installdocs --link-doc=@LOVE_LIB_NAME@0
override_dh_installchangelogs:
dh_installchangelogs changes.txt
@@ -26,6 +18,6 @@ override_dh_installman:
dh_installman
override_dh_strip:
dh_strip -pliblove@LOVE_SUFFIX@0 --dbg-package=liblove@LOVE_SUFFIX@-dbg
dh_strip -p@LOVE_LIB_NAME@0 --dbg-package=@LOVE_LIB_NAME@-dbg
dh_strip --remaining-packages
-77
View File
@@ -1,77 +0,0 @@
AC_DEFUN([ACLOVE_DEP_FREETYPE2], [
PKG_CHECK_MODULES([freetype2], [freetype2], [], [LOVE_MSG_ERROR([FreeType2])])])
AC_DEFUN([ACLOVE_DEP_HARFBUZZ], [
PKG_CHECK_MODULES([harfbuzz], [harfbuzz], [], [LOVE_MSG_ERROR([Harfbuzz])])])
AC_DEFUN([ACLOVE_DEP_OPENAL], [
PKG_CHECK_MODULES([openal], [openal], [], [LOVE_MSG_ERROR([OpenAL])])])
AC_DEFUN([ACLOVE_DEP_LIBMODPLUG], [
PKG_CHECK_MODULES([libmodplug], [libmodplug], [], [LOVE_MSG_ERROR([libmodplug])])])
AC_DEFUN([ACLOVE_DEP_VORBISFILE], [
PKG_CHECK_MODULES([vorbisfile], [vorbisfile], [], [LOVE_MSG_ERROR([libvorbis and libvorbisfile])])])
AC_DEFUN([ACLOVE_DEP_ZLIB], [
PKG_CHECK_MODULES([zlib], [zlib], [], [LOVE_MSG_ERROR([zlib])])])
AC_DEFUN([ACLOVE_DEP_THEORA], [
PKG_CHECK_MODULES([theora], [theoradec], [], [LOVE_MSG_ERROR([libtheora])])])
AC_DEFUN([ACLOVE_DEP_LIBM], [
AC_SEARCH_LIBS([sqrt], [m], [], [LOVE_MSG_ERROR([the C math library])])])
AC_DEFUN([ACLOVE_DEP_SDL2], [
aclove_sdl2_found=no
AM_PATH_SDL2([2.0.9], [aclove_sdl2_found=yes], [])
AS_VAR_IF([aclove_sdl2_found], [no], [LOVE_MSG_ERROR([SDL 2])], [])])
AC_DEFUN([ACLOVE_DEP_PTHREAD], [
AC_SEARCH_LIBS([pthread_create], [pthread], [], [LOVE_MSG_ERROR([the POSIX threads library])])])
# does not use pkg-config because of the FILE_OFFSET_BITS.. bit
AC_DEFUN([ACLOVE_DEP_MPG123], [
AC_SEARCH_LIBS([mpg123_open_feed], [mpg123], [],
[LOVE_MSG_ERROR([libmpg123])])
AC_SEARCH_LIBS([mpg123_seek_64], [mpg123],
AC_SUBST([FILE_OFFSET],[-D_FILE_OFFSET_BITS=64]),
AC_SUBST([FILE_OFFSET],[]))])
# For enet
AC_DEFUN([ACLOVE_SOCKLEN_T], [
AC_CHECK_TYPE([socklen_t], [AC_DEFINE([HAS_SOCKLEN_T], [1], [Define if socklen_t exists.] )], ,
#include <sys/types.h>
#include <sys/socket.h>
)])
# The lua detection is quite annoying because of distro differences and our version selection code
AC_DEFUN([ACLOVE_DEP_LUA_PKGCONFIG], [
PKG_CHECK_MODULES([lua], [${with_lua}${with_luaversion}], [aclove_lua_found=yes],
[PKG_CHECK_MODULES([lua], [${with_lua}${with_clean_luaversion}], [aclove_lua_found=yes],
[PKG_CHECK_MODULES([lua], [${with_lua}], [aclove_lua_found=yes], [])])])
AS_VAR_IF([aclove_lua_found], [yes],
[
aclove_luaheaders_found=yes
AC_MSG_CHECKING([for library containing lua_call])
AC_MSG_RESULT([${lua_LIBS}])
], [])])
AC_DEFUN([ACLOVE_DEP_LUA_FALLBACK], [
AC_MSG_WARN([Could not find pkg-config definition for ${with_lua}${with_luaversion} or ${with_lua}${with_clean_luaversion}${with_lua}, falling back to manual detection])
AC_SEARCH_LIBS([lua_call], ["${with_lua}${with_luaversion}" "${with_lua}"], [aclove_lua_found=yes],
[LOVE_MSG_ERROR([$with_lua])])
AC_CHECK_HEADER(["${with_lua}${with_luaversion}/lua.h"], [aclove_luaheaders_found=yes includes="$includes -I/usr/include/${with_lua}${with_luaversion}"], [])
AC_CHECK_HEADER(["${with_lua}/lua.h"], [aclove_luaheaders_found=yes includes="$includes -I/usr/include/${with_lua}"], [])])
# First, try pkg-config, then fall back to manual detection if not available.
AC_DEFUN([ACLOVE_DEP_LUA], [ dnl Requires with-lua and with-luaversion
aclove_lua_found=no
aclove_luaheaders_found=no
ACLOVE_DEP_LUA_PKGCONFIG
AS_VAR_IF([aclove_lua_found], [no], [ACLOVE_DEP_LUA_FALLBACK], [])
AS_VAR_IF([aclove_luaheaders_found], [no],
[AC_MSG_WARN([Could not locate lua headers for ${with_lua}${with_luaversion} or ${with_lua}, you probably need to specify them with CPPFLAGS])], [])])
-3
View File
@@ -1,3 +0,0 @@
\./libraries/luasocket/libluasocket/wsocket.*
\./love\.cpp
\./libraries/glslang/glslang/OSDependent/Windows
-157
View File
@@ -1,157 +0,0 @@
#!/bin/bash
love_suffix="$1"
love_amsuffix="$(echo "$love_suffix" | sed 's/\-/_/g' | sed 's/\./_/g')"
flags=()
upper()
{
echo "$@" | tr '[:lower:]' '[:upper:]'
}
sourcefind()
{
find "$1" $2 -type f \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" -o -iname "*.hpp" -o -iname "*.lch" -o -iname "*.lua" \) | awk "{print \"./$prefix\"\$0\" \\\\\"}" | grep -v -f"$LOVEROOT/platform/unix/exclude" | sort
}
handlemodule()
{
module="$1"
DEFINENAME="LOVE_MODULE_$(upper "$module")"
printf "$DEFINENAME"
}
genmodules()
{
LOVEROOT="$(pwd)"
cd ./src
printf "liblove${love_amsuffix}_la_SOURCES = \\\\\n"
sourcefind "common" | sed "s/^/ /"
FILES="$(sourcefind "scripts" | sed "s/^/ /")"
printf "${FILES:0:${#FILES}-2}\n\n"
local -a modulelist=()
local -a liblist=()
cd ./modules
prefix="modules/"
for module in *; do
flags+=("module-$module")
FILES="$(sourcefind "$module" | sed "s/^/ /")"
if [[ "x$FILES" != "x" ]]; then
printf "liblove_module_$module = \\\\\n"
printf "${FILES:0:${#FILES}-2}\n\n"
modulelist+=("$module")
fi
done
cd ../libraries
prefix="libraries/"
for library in *; do
flags+=("library-$library")
FILES="$(sourcefind "$library" | sed "s/^/ /")"
if [[ ${#FILES} -gt 2 ]]; then
printf "liblove_library_$library = \\\\\n"
printf "${FILES:0:${#FILES}-2}\n\n"
liblist+=("$library")
fi
done
for module in "${modulelist[@]}"; do
NAME=$(handlemodule "$module")
printf "if $NAME\n"
printf "liblove${love_amsuffix}_la_SOURCES += \$(liblove_module_$module)\n"
printf "endif\n\n"
done
for library in "${liblist[@]}"; do
NAME="LOVE_LIBRARY_$(upper "$library")"
printf "if $NAME\n"
printf "liblove${love_amsuffix}_la_SOURCES += \$(liblove_library_$library)\n"
printf "endif\n\n"
done
cd ../..
}
genflags()
{
printf > configure-modules-pre.ac
printf > configure-modules-post.ac
for flag in "${flags[@]}"; do
prettyflag="$(echo "$flag" | sed -e 's/-/ love./' -e 's/-/./g')"
varflag="enable_$(echo "$flag" | sed -e 's/[^a-zA-Z0-9]/_/')"
defineflag="LOVE_ENABLE_$(upper $(echo $flag | sed -e 's/^[^-]*-//' -e 's/-/_/g'))"
amflag="$(upper $(echo love-$flag | sed 's/-/_/g'))"
# Don't generate an --enable rule for libraries
if [[ "$(echo $flag | sed -e '/^library-/d')" != "" ]]; then
printf "AC_ARG_ENABLE([$flag], [ --disable-$flag Turn off $prettyflag], [], [$varflag=yes])\n" >> configure-modules-pre.ac
fi
printf "AH_TEMPLATE([$defineflag], [])\n" >> configure-modules-post.ac
printf "if test x\"\$$varflag\" = xyes; then\n" >> configure-modules-post.ac
printf " AC_DEFINE([$defineflag], [])\n" >> configure-modules-post.ac
printf "fi\n" >> configure-modules-post.ac
printf "AM_CONDITIONAL([$amflag], [test x\$$varflag = xyes])\n\n" >> configure-modules-post.ac
done
}
echo Generating src/Makefile.am ...
inc_current='$(srcdir)'
inc_modules="$inc_current/modules"
inc_libraries="$inc_current/libraries"
cat > src/Makefile.am << EOF
AM_CPPFLAGS = -I$inc_current -I$inc_modules -I$inc_libraries -I$inc_libraries/enet/libenet/include -I$inc_libraries/box2d \$(LOVE_INCLUDES) \$(FILE_OFFSET)\
\$(SDL_CFLAGS) \$(lua_CFLAGS) \$(freetype2_CFLAGS) \$(harfbuzz_CFLAGS)\
\$(openal_CFLAGS) \$(zlib_CFLAGS) \$(libmodplug_CFLAGS)\
\$(vorbisfile_CFLAGS) \$(theora_CFLAGS)
AUTOMAKE_OPTIONS = subdir-objects
SUBDIRS =
SUFFIXES = .lua .lua.h
if LOVE_BUILD_EXE
# LÖVE executable
bin_PROGRAMS = love${love_suffix}
#love_LDFLAGS =
love${love_amsuffix}_LDADD = liblove${love_suffix}.la \$(lua_LIBS)
love${love_amsuffix}_SOURCES = love.cpp
if LOVE_TARGET_OSX
love${love_amsuffix}_LIBTOOLFLAGS = --tag=OBJCXX
love${love_amsuffix}_SOURCES += \\
./common/macosx.mm
else
love${love_amsuffix}_LIBTOOLFLAGS = --tag=CXX
endif
endif
# Compile scripts
.lua.lua.h:
cd ./scripts; \
\$(LUA_EXECUTABLE) auto.lua \$<
# libLÖVE
lib_LTLIBRARIES = liblove${love_suffix}.la
liblove${love_amsuffix}_la_LDFLAGS = -module -export-dynamic \$(LDFLAGS) -release \$(PACKAGE_VERSION)
liblove${love_amsuffix}_la_LIBADD = \
\$(SDL_LIBS) \$(freetype2_LIBS) \$(harfbuzz_LIBS) \$(lua_LIBS)\
\$(openal_LIBS) \$(zlib_LIBS) \$(libmodplug_LIBS)\
\$(vorbisfile_LIBS) \$(theora_LIBS)
EOF
genmodules >> src/Makefile.am
echo "src/Makefile.am is updated! ^.^"
echo "Generating configure-modules.ac"
genflags
cat >> configure-modules-post.ac << EOF
AC_SUBST([LOVE_SUFFIX], [${love_suffix}])
EOF
echo "configure-modules.ac is updated! ^.^"
+1 -1
View File
@@ -2,7 +2,7 @@
Name=LÖVE
Comment=The unquestionably awesome 2D game engine
MimeType=application/x-love-game;
Exec=@bindir@/love %f
Exec=@CMAKE_INSTALL_FULL_BINDIR@/love %f
Type=Application
Categories=Development;Game;
Terminal=false
-57
View File
@@ -1,57 +0,0 @@
mkdir -p include/luajit
mkdir -p libraries/luajit
if [ ! -d luajit-git ]; then
git clone https://github.com/LuaJIT/LuaJIT.git luajit-git
fi
cd luajit-git
git pull --no-rebase
git checkout v2.1
export MACOSX_DEPLOYMENT_TARGET=10.7
# iOS device binaries
# LuaJIT does not support building for armv7 on modern macOS versions.
ISDKP=$(xcrun --sdk iphoneos --show-sdk-path)
ICC=$(xcrun --sdk iphoneos --find clang)
ISDKF="-arch arm64 -isysroot $ISDKP -mios-version-min=8.0"
make clean TARGET_SYS=iOS
make -j8 CC="clang" CROSS="$(dirname $ICC)/" TARGET_FLAGS="$ISDKF" TARGET_SYS=iOS
cp src/libluajit.a ../libraries/luajit/libluajit_arm64_device.a
# iOS simulator binaries
ISDKP=$(xcrun --sdk iphonesimulator --show-sdk-path)
ICC=$(xcrun --sdk iphonesimulator --find clang)
ISDKF="-arch x86_64 -isysroot $ISDKP -mios-simulator-version-min=8.0"
make clean TARGET_SYS=iOS
make -j8 CC="clang" CROSS="$(dirname $ICC)/" TARGET_FLAGS="$ISDKF" TARGET_SYS=iOS
cp src/libluajit.a ../libraries/luajit/libluajit_x86_64_sim.a
ISDKF="-arch arm64 -isysroot $ISDKP -mios-simulator-version-min=8.0"
make clean TARGET_SYS=iOS
make -j8 CC="clang" CROSS="$(dirname $ICC)/" TARGET_FLAGS="$ISDKF" TARGET_SYS=iOS
cp src/libluajit.a ../libraries/luajit/libluajit_arm64_sim.a
# copy includes
cp src/lua.hpp ../include/luajit
cp src/lauxlib.h ../include/luajit
cp src/lua.h ../include/luajit
cp src/luaconf.h ../include/luajit
cp src/lualib.h ../include/luajit
cp src/luajit.h ../include/luajit
# combine lib
cd ../libraries/luajit
lipo -create -output libluajit_device.a libluajit_arm64_device.a
lipo -create -output libluajit_sim.a libluajit_x86_64_sim.a libluajit_arm64_sim.a
# create xcframework with all platforms
rm -rf Lua.xcframework
xcodebuild -create-xcframework -library libluajit_device.a -headers ../../include/luajit -library libluajit_sim.a -headers ../../include/luajit -output Lua.xcframework
@@ -51,6 +51,12 @@
217DFC111D9F6D490055D849 /* usocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBD51D9F6D490055D849 /* usocket.c */; };
217DFC121D9F6D490055D849 /* usocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBD61D9F6D490055D849 /* usocket.h */; };
D923E7D3296B85B9002FF1B3 /* harfbuzz.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D923E7D2296B85B9002FF1B3 /* harfbuzz.xcframework */; };
D943E58E2A24D56000D80361 /* PhysfsIo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D943E58C2A24D56000D80361 /* PhysfsIo.cpp */; };
D943E58F2A24D56000D80361 /* PhysfsIo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D943E58C2A24D56000D80361 /* PhysfsIo.cpp */; };
D943E5902A24D56000D80361 /* PhysfsIo.h in Headers */ = {isa = PBXBuildFile; fileRef = D943E58D2A24D56000D80361 /* PhysfsIo.h */; };
D99081EE2BB2473900D2B0E4 /* JoystickSDL3.h in Headers */ = {isa = PBXBuildFile; fileRef = D99081EC2BB2473900D2B0E4 /* JoystickSDL3.h */; };
D99081EF2BB2473900D2B0E4 /* JoystickSDL3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D99081ED2BB2473900D2B0E4 /* JoystickSDL3.cpp */; };
D99081F02BB2473900D2B0E4 /* JoystickSDL3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D99081ED2BB2473900D2B0E4 /* JoystickSDL3.cpp */; };
D9DAB9222961F0EE00C64820 /* HarfbuzzShaper.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DAB9202961F0EE00C64820 /* HarfbuzzShaper.h */; };
D9DAB9232961F0EE00C64820 /* HarfbuzzShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9212961F0EE00C64820 /* HarfbuzzShaper.cpp */; };
D9DAB9242961F0EE00C64820 /* HarfbuzzShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9212961F0EE00C64820 /* HarfbuzzShaper.cpp */; };
@@ -61,9 +67,15 @@
D9DAB92D2961F10000C64820 /* TextShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9282961F10000C64820 /* TextShaper.cpp */; };
D9DAB92E2961F10000C64820 /* TextShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9282961F10000C64820 /* TextShaper.cpp */; };
D9DAB9322963CD7500C64820 /* harfbuzz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9DAB9312963CD7500C64820 /* harfbuzz.framework */; };
D943E58E2A24D56000D80361 /* PhysfsIo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D943E58C2A24D56000D80361 /* PhysfsIo.cpp */; };
D943E58F2A24D56000D80361 /* PhysfsIo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D943E58C2A24D56000D80361 /* PhysfsIo.cpp */; };
D943E5902A24D56000D80361 /* PhysfsIo.h in Headers */ = {isa = PBXBuildFile; fileRef = D943E58D2A24D56000D80361 /* PhysfsIo.h */; };
D9DB6E272B4B40660037A1F6 /* ResourceLimits.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E252B4B40660037A1F6 /* ResourceLimits.h */; };
D9DB6E292B4B40970037A1F6 /* span.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E282B4B40970037A1F6 /* span.h */; };
D9DB6E362B4B41100037A1F6 /* ResourceLimits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DB6E332B4B41100037A1F6 /* ResourceLimits.cpp */; };
D9DB6E372B4B41100037A1F6 /* ResourceLimits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DB6E332B4B41100037A1F6 /* ResourceLimits.cpp */; };
D9DB6E3E2B4B41580037A1F6 /* NonSemanticDebugPrintf.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E382B4B41570037A1F6 /* NonSemanticDebugPrintf.h */; };
D9DB6E3F2B4B41580037A1F6 /* NonSemanticShaderDebugInfo100.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E392B4B41570037A1F6 /* NonSemanticShaderDebugInfo100.h */; };
D9DB6E402B4B41580037A1F6 /* GLSL.ext.ARM.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E3A2B4B41570037A1F6 /* GLSL.ext.ARM.h */; };
D9DB6E412B4B41580037A1F6 /* GLSL.ext.QCOM.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E3B2B4B41580037A1F6 /* GLSL.ext.QCOM.h */; };
D9DB6E452B4B80E80037A1F6 /* build_info.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E442B4B80E80037A1F6 /* build_info.h */; };
FA0A3A5F23366CE9001C269E /* floattypes.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0A3A5D23366CE9001C269E /* floattypes.h */; };
FA0A3A6023366CE9001C269E /* floattypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0A3A5E23366CE9001C269E /* floattypes.cpp */; };
FA0A3A6123366CE9001C269E /* floattypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0A3A5E23366CE9001C269E /* floattypes.cpp */; };
@@ -407,9 +419,6 @@
FA0B7E091A95902C000E1D17 /* EdgeShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C291A95902C000E1D17 /* EdgeShape.cpp */; };
FA0B7E0A1A95902C000E1D17 /* EdgeShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C291A95902C000E1D17 /* EdgeShape.cpp */; };
FA0B7E0B1A95902C000E1D17 /* EdgeShape.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C2A1A95902C000E1D17 /* EdgeShape.h */; };
FA0B7E0C1A95902C000E1D17 /* Fixture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C2B1A95902C000E1D17 /* Fixture.cpp */; };
FA0B7E0D1A95902C000E1D17 /* Fixture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C2B1A95902C000E1D17 /* Fixture.cpp */; };
FA0B7E0E1A95902C000E1D17 /* Fixture.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C2C1A95902C000E1D17 /* Fixture.h */; };
FA0B7E0F1A95902C000E1D17 /* FrictionJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C2D1A95902C000E1D17 /* FrictionJoint.cpp */; };
FA0B7E101A95902C000E1D17 /* FrictionJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C2D1A95902C000E1D17 /* FrictionJoint.cpp */; };
FA0B7E111A95902C000E1D17 /* FrictionJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C2E1A95902C000E1D17 /* FrictionJoint.h */; };
@@ -473,9 +482,6 @@
FA0B7E4B1A95902C000E1D17 /* wrap_EdgeShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C551A95902C000E1D17 /* wrap_EdgeShape.cpp */; };
FA0B7E4C1A95902C000E1D17 /* wrap_EdgeShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C551A95902C000E1D17 /* wrap_EdgeShape.cpp */; };
FA0B7E4D1A95902C000E1D17 /* wrap_EdgeShape.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C561A95902C000E1D17 /* wrap_EdgeShape.h */; };
FA0B7E4E1A95902C000E1D17 /* wrap_Fixture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C571A95902C000E1D17 /* wrap_Fixture.cpp */; };
FA0B7E4F1A95902C000E1D17 /* wrap_Fixture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C571A95902C000E1D17 /* wrap_Fixture.cpp */; };
FA0B7E501A95902C000E1D17 /* wrap_Fixture.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C581A95902C000E1D17 /* wrap_Fixture.h */; };
FA0B7E511A95902C000E1D17 /* wrap_FrictionJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C591A95902C000E1D17 /* wrap_FrictionJoint.cpp */; };
FA0B7E521A95902C000E1D17 /* wrap_FrictionJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C591A95902C000E1D17 /* wrap_FrictionJoint.cpp */; };
FA0B7E531A95902C000E1D17 /* wrap_FrictionJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C5A1A95902C000E1D17 /* wrap_FrictionJoint.h */; };
@@ -676,8 +682,6 @@
FA18CF2B23DCF67900263725 /* spirv_cross_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0423DCF67800263725 /* spirv_cross_util.cpp */; };
FA18CF2C23DCF67900263725 /* spirv_cross.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0523DCF67800263725 /* spirv_cross.cpp */; };
FA18CF2D23DCF67900263725 /* spirv_cross.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0523DCF67800263725 /* spirv_cross.cpp */; };
FA18CF2E23DCF67900263725 /* spirv_cross_c.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0623DCF67800263725 /* spirv_cross_c.cpp */; };
FA18CF2F23DCF67900263725 /* spirv_cross_c.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0623DCF67800263725 /* spirv_cross_c.cpp */; };
FA18CF3023DCF67900263725 /* spirv_hlsl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0723DCF67800263725 /* spirv_hlsl.cpp */; };
FA18CF3123DCF67900263725 /* spirv_hlsl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0723DCF67800263725 /* spirv_hlsl.cpp */; };
FA18CF3223DCF67900263725 /* spirv_cfg.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF0823DCF67800263725 /* spirv_cfg.hpp */; };
@@ -685,8 +689,6 @@
FA18CF3423DCF67900263725 /* spirv_cpp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0923DCF67800263725 /* spirv_cpp.cpp */; };
FA18CF3523DCF67900263725 /* spirv_cross_parsed_ir.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0A23DCF67800263725 /* spirv_cross_parsed_ir.cpp */; };
FA18CF3623DCF67900263725 /* spirv_cross_parsed_ir.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0A23DCF67800263725 /* spirv_cross_parsed_ir.cpp */; };
FA18CF3723DCF67900263725 /* spirv.h in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF0B23DCF67800263725 /* spirv.h */; };
FA18CF3823DCF67900263725 /* spirv_cross_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF0C23DCF67800263725 /* spirv_cross_c.h */; };
FA18CF3923DCF67900263725 /* spirv_msl.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF0D23DCF67800263725 /* spirv_msl.hpp */; };
FA18CF3A23DCF67900263725 /* spirv_reflect.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF0E23DCF67800263725 /* spirv_reflect.hpp */; };
FA18CF3B23DCF67900263725 /* spirv_cross_util.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF0F23DCF67800263725 /* spirv_cross_util.hpp */; };
@@ -1294,9 +1296,6 @@
FAF140BB1E20934C00F898D2 /* ossource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF140211E20934C00F898D2 /* ossource.cpp */; };
FAF140BC1E20934C00F898D2 /* ossource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF140211E20934C00F898D2 /* ossource.cpp */; };
FAF140C41E20934C00F898D2 /* ShaderLang.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF140291E20934C00F898D2 /* ShaderLang.h */; };
FAF140DB1E20934C00F898D2 /* InitializeDll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF1403B1E20934C00F898D2 /* InitializeDll.cpp */; };
FAF140DC1E20934C00F898D2 /* InitializeDll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF1403B1E20934C00F898D2 /* InitializeDll.cpp */; };
FAF140DD1E20934C00F898D2 /* InitializeDll.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF1403C1E20934C00F898D2 /* InitializeDll.h */; };
FAF6C9DA23C2DE2900D7B5BC /* SPVRemapper.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9C123C2DE2900D7B5BC /* SPVRemapper.h */; };
FAF6C9DB23C2DE2900D7B5BC /* SpvBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9C223C2DE2900D7B5BC /* SpvBuilder.h */; };
FAF6C9DC23C2DE2900D7B5BC /* SpvPostProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9C323C2DE2900D7B5BC /* SpvPostProcess.cpp */; };
@@ -1406,6 +1405,10 @@
217DFBD51D9F6D490055D849 /* usocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = usocket.c; sourceTree = "<group>"; };
217DFBD61D9F6D490055D849 /* usocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = usocket.h; sourceTree = "<group>"; };
D923E7D2296B85B9002FF1B3 /* harfbuzz.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = harfbuzz.xcframework; path = ios/libraries/harfbuzz.xcframework; sourceTree = "<group>"; };
D943E58C2A24D56000D80361 /* PhysfsIo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PhysfsIo.cpp; sourceTree = "<group>"; };
D943E58D2A24D56000D80361 /* PhysfsIo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhysfsIo.h; sourceTree = "<group>"; };
D99081EC2BB2473900D2B0E4 /* JoystickSDL3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JoystickSDL3.h; sourceTree = "<group>"; };
D99081ED2BB2473900D2B0E4 /* JoystickSDL3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JoystickSDL3.cpp; sourceTree = "<group>"; };
D9DAB9202961F0EE00C64820 /* HarfbuzzShaper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HarfbuzzShaper.h; sourceTree = "<group>"; };
D9DAB9212961F0EE00C64820 /* HarfbuzzShaper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HarfbuzzShaper.cpp; sourceTree = "<group>"; };
D9DAB9252961F0FF00C64820 /* GenericShaper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericShaper.h; sourceTree = "<group>"; };
@@ -1413,8 +1416,14 @@
D9DAB9272961F0FF00C64820 /* TextShaper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextShaper.h; sourceTree = "<group>"; };
D9DAB9282961F10000C64820 /* TextShaper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextShaper.cpp; sourceTree = "<group>"; };
D9DAB9312963CD7500C64820 /* harfbuzz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = harfbuzz.framework; path = macosx/Frameworks/harfbuzz.framework; sourceTree = "<group>"; };
D943E58C2A24D56000D80361 /* PhysfsIo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PhysfsIo.cpp; sourceTree = "<group>"; };
D943E58D2A24D56000D80361 /* PhysfsIo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhysfsIo.h; sourceTree = "<group>"; };
D9DB6E252B4B40660037A1F6 /* ResourceLimits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLimits.h; sourceTree = "<group>"; };
D9DB6E282B4B40970037A1F6 /* span.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = span.h; sourceTree = "<group>"; };
D9DB6E332B4B41100037A1F6 /* ResourceLimits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLimits.cpp; sourceTree = "<group>"; };
D9DB6E382B4B41570037A1F6 /* NonSemanticDebugPrintf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NonSemanticDebugPrintf.h; sourceTree = "<group>"; };
D9DB6E392B4B41570037A1F6 /* NonSemanticShaderDebugInfo100.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NonSemanticShaderDebugInfo100.h; sourceTree = "<group>"; };
D9DB6E3A2B4B41570037A1F6 /* GLSL.ext.ARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLSL.ext.ARM.h; sourceTree = "<group>"; };
D9DB6E3B2B4B41580037A1F6 /* GLSL.ext.QCOM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLSL.ext.QCOM.h; sourceTree = "<group>"; };
D9DB6E442B4B80E80037A1F6 /* build_info.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = build_info.h; sourceTree = "<group>"; };
FA08F5AE16C7525600F007B5 /* liblove-macosx.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "liblove-macosx.plist"; path = "macosx/liblove-macosx.plist"; sourceTree = "<group>"; };
FA0A3A5D23366CE9001C269E /* floattypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = floattypes.h; sourceTree = "<group>"; };
FA0A3A5E23366CE9001C269E /* floattypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = floattypes.cpp; sourceTree = "<group>"; };
@@ -1652,8 +1661,6 @@
FA0B7C281A95902C000E1D17 /* DistanceJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DistanceJoint.h; sourceTree = "<group>"; };
FA0B7C291A95902C000E1D17 /* EdgeShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EdgeShape.cpp; sourceTree = "<group>"; };
FA0B7C2A1A95902C000E1D17 /* EdgeShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EdgeShape.h; sourceTree = "<group>"; };
FA0B7C2B1A95902C000E1D17 /* Fixture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Fixture.cpp; sourceTree = "<group>"; };
FA0B7C2C1A95902C000E1D17 /* Fixture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Fixture.h; sourceTree = "<group>"; };
FA0B7C2D1A95902C000E1D17 /* FrictionJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrictionJoint.cpp; sourceTree = "<group>"; };
FA0B7C2E1A95902C000E1D17 /* FrictionJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrictionJoint.h; sourceTree = "<group>"; };
FA0B7C2F1A95902C000E1D17 /* GearJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GearJoint.cpp; sourceTree = "<group>"; };
@@ -1696,8 +1703,6 @@
FA0B7C541A95902C000E1D17 /* wrap_DistanceJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_DistanceJoint.h; sourceTree = "<group>"; };
FA0B7C551A95902C000E1D17 /* wrap_EdgeShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_EdgeShape.cpp; sourceTree = "<group>"; };
FA0B7C561A95902C000E1D17 /* wrap_EdgeShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_EdgeShape.h; sourceTree = "<group>"; };
FA0B7C571A95902C000E1D17 /* wrap_Fixture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Fixture.cpp; sourceTree = "<group>"; };
FA0B7C581A95902C000E1D17 /* wrap_Fixture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Fixture.h; sourceTree = "<group>"; };
FA0B7C591A95902C000E1D17 /* wrap_FrictionJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_FrictionJoint.cpp; sourceTree = "<group>"; };
FA0B7C5A1A95902C000E1D17 /* wrap_FrictionJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_FrictionJoint.h; sourceTree = "<group>"; };
FA0B7C5B1A95902C000E1D17 /* wrap_GearJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_GearJoint.cpp; sourceTree = "<group>"; };
@@ -1835,13 +1840,10 @@
FA18CF0323DCF67800263725 /* spirv_msl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_msl.cpp; sourceTree = "<group>"; };
FA18CF0423DCF67800263725 /* spirv_cross_util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_cross_util.cpp; sourceTree = "<group>"; };
FA18CF0523DCF67800263725 /* spirv_cross.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_cross.cpp; sourceTree = "<group>"; };
FA18CF0623DCF67800263725 /* spirv_cross_c.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_cross_c.cpp; sourceTree = "<group>"; };
FA18CF0723DCF67800263725 /* spirv_hlsl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_hlsl.cpp; sourceTree = "<group>"; };
FA18CF0823DCF67800263725 /* spirv_cfg.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_cfg.hpp; sourceTree = "<group>"; };
FA18CF0923DCF67800263725 /* spirv_cpp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_cpp.cpp; sourceTree = "<group>"; };
FA18CF0A23DCF67800263725 /* spirv_cross_parsed_ir.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_cross_parsed_ir.cpp; sourceTree = "<group>"; };
FA18CF0B23DCF67800263725 /* spirv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spirv.h; sourceTree = "<group>"; };
FA18CF0C23DCF67800263725 /* spirv_cross_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spirv_cross_c.h; sourceTree = "<group>"; };
FA18CF0D23DCF67800263725 /* spirv_msl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_msl.hpp; sourceTree = "<group>"; };
FA18CF0E23DCF67800263725 /* spirv_reflect.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_reflect.hpp; sourceTree = "<group>"; };
FA18CF0F23DCF67800263725 /* spirv_cross_util.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_cross_util.hpp; sourceTree = "<group>"; };
@@ -1955,8 +1957,6 @@
FA7DA04C1C16874A0056B200 /* wrap_Math.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wrap_Math.lua; sourceTree = "<group>"; };
FA7E9206277E120900C24CB2 /* theora.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = theora.xcframework; path = ios/libraries/theora.xcframework; sourceTree = "<group>"; };
FA84DE5D2778D7DB002674C6 /* SpirvIntrinsics.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SpirvIntrinsics.h; sourceTree = "<group>"; };
FA84DE5E2778D7DC002674C6 /* glslang_c_interface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = glslang_c_interface.h; sourceTree = "<group>"; };
FA84DE5F2778D7DC002674C6 /* glslang_c_shader_types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = glslang_c_shader_types.h; sourceTree = "<group>"; };
FA84DE602778D7F3002674C6 /* SpirvIntrinsics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpirvIntrinsics.cpp; sourceTree = "<group>"; };
FA84DE6427791C36002674C6 /* GraphicsReadback.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsReadback.cpp; sourceTree = "<group>"; };
FA84DE6527791C36002674C6 /* GraphicsReadback.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsReadback.h; sourceTree = "<group>"; };
@@ -2209,7 +2209,6 @@
FADF543A1E3DAFF700012CC0 /* wrap_Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Graphics.h; sourceTree = "<group>"; };
FAE272501C05A15B00A67640 /* ParticleSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParticleSystem.cpp; sourceTree = "<group>"; };
FAE272511C05A15B00A67640 /* ParticleSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParticleSystem.h; sourceTree = "<group>"; };
FAEC229F2534F25100EBD925 /* build_info.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = build_info.h; sourceTree = "<group>"; };
FAECA1B01F3164700095D008 /* CompressedSlice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CompressedSlice.cpp; sourceTree = "<group>"; };
FAECA1B11F3164700095D008 /* CompressedSlice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CompressedSlice.h; sourceTree = "<group>"; };
FAF13FC21E20934C00F898D2 /* CodeGen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGen.cpp; sourceTree = "<group>"; };
@@ -2271,8 +2270,6 @@
FAF140031E20934C00F898D2 /* osinclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = osinclude.h; sourceTree = "<group>"; };
FAF140211E20934C00F898D2 /* ossource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossource.cpp; sourceTree = "<group>"; };
FAF140291E20934C00F898D2 /* ShaderLang.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShaderLang.h; sourceTree = "<group>"; };
FAF1403B1E20934C00F898D2 /* InitializeDll.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InitializeDll.cpp; sourceTree = "<group>"; };
FAF1403C1E20934C00F898D2 /* InitializeDll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitializeDll.h; sourceTree = "<group>"; };
FAF1889C1E9DA834008C1479 /* Optional.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Optional.h; sourceTree = "<group>"; };
FAF6C9C123C2DE2900D7B5BC /* SPVRemapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPVRemapper.h; sourceTree = "<group>"; };
FAF6C9C223C2DE2900D7B5BC /* SpvBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpvBuilder.h; sourceTree = "<group>"; };
@@ -2381,6 +2378,14 @@
sourceTree = "<group>";
usesTabs = 1;
};
D9DB6E312B4B41100037A1F6 /* ResourceLimits */ = {
isa = PBXGroup;
children = (
D9DB6E332B4B41100037A1F6 /* ResourceLimits.cpp */,
);
path = ResourceLimits;
sourceTree = "<group>";
};
FA08F5AC16C751BA00F007B5 /* Resources */ = {
isa = PBXGroup;
children = (
@@ -3047,6 +3052,8 @@
FA0B7BEE1A95902C000E1D17 /* Joystick.h */,
FA0B7BEF1A95902C000E1D17 /* JoystickModule.cpp */,
FA0B7BF01A95902C000E1D17 /* JoystickModule.h */,
D99081ED2BB2473900D2B0E4 /* JoystickSDL3.cpp */,
D99081EC2BB2473900D2B0E4 /* JoystickSDL3.h */,
);
path = sdl;
sourceTree = "<group>";
@@ -3165,8 +3172,6 @@
FA0B7C281A95902C000E1D17 /* DistanceJoint.h */,
FA0B7C291A95902C000E1D17 /* EdgeShape.cpp */,
FA0B7C2A1A95902C000E1D17 /* EdgeShape.h */,
FA0B7C2B1A95902C000E1D17 /* Fixture.cpp */,
FA0B7C2C1A95902C000E1D17 /* Fixture.h */,
FA0B7C2D1A95902C000E1D17 /* FrictionJoint.cpp */,
FA0B7C2E1A95902C000E1D17 /* FrictionJoint.h */,
FA0B7C2F1A95902C000E1D17 /* GearJoint.cpp */,
@@ -3209,8 +3214,6 @@
FA0B7C541A95902C000E1D17 /* wrap_DistanceJoint.h */,
FA0B7C551A95902C000E1D17 /* wrap_EdgeShape.cpp */,
FA0B7C561A95902C000E1D17 /* wrap_EdgeShape.h */,
FA0B7C571A95902C000E1D17 /* wrap_Fixture.cpp */,
FA0B7C581A95902C000E1D17 /* wrap_Fixture.h */,
FA0B7C591A95902C000E1D17 /* wrap_FrictionJoint.cpp */,
FA0B7C5A1A95902C000E1D17 /* wrap_FrictionJoint.h */,
FA0B7C5B1A95902C000E1D17 /* wrap_GearJoint.cpp */,
@@ -3455,8 +3458,6 @@
FA18CF1423DCF67800263725 /* spirv_common.hpp */,
FA18CF0923DCF67800263725 /* spirv_cpp.cpp */,
FA18CF0023DCF67800263725 /* spirv_cpp.hpp */,
FA18CF0623DCF67800263725 /* spirv_cross_c.cpp */,
FA18CF0C23DCF67800263725 /* spirv_cross_c.h */,
FA18CF1223DCF67800263725 /* spirv_cross_containers.hpp */,
FA18CEF423DCF67800263725 /* spirv_cross_error_handling.hpp */,
FA18CF0A23DCF67800263725 /* spirv_cross_parsed_ir.cpp */,
@@ -3475,7 +3476,6 @@
FA18CEF223DCF67800263725 /* spirv_parser.hpp */,
FA18CF0223DCF67800263725 /* spirv_reflect.cpp */,
FA18CF0E23DCF67800263725 /* spirv_reflect.hpp */,
FA18CF0B23DCF67800263725 /* spirv.h */,
FA18CEFE23DCF67800263725 /* spirv.hpp */,
);
path = spirv_cross;
@@ -3884,7 +3884,6 @@
isa = PBXGroup;
children = (
FAF13FC01E20934C00F898D2 /* glslang */,
FAF1403A1E20934C00F898D2 /* OGLCompilersDLL */,
FAF6C9C023C2DE2900D7B5BC /* SPIRV */,
);
path = glslang;
@@ -3893,12 +3892,13 @@
FAF13FC01E20934C00F898D2 /* glslang */ = {
isa = PBXGroup;
children = (
FAEC229F2534F25100EBD925 /* build_info.h */,
D9DB6E442B4B80E80037A1F6 /* build_info.h */,
FAF13FC11E20934C00F898D2 /* GenericCodeGen */,
FAF13FC41E20934C00F898D2 /* Include */,
FAF13FD21E20934C00F898D2 /* MachineIndependent */,
FAF140021E20934C00F898D2 /* OSDependent */,
FAF140281E20934C00F898D2 /* Public */,
D9DB6E312B4B41100037A1F6 /* ResourceLimits */,
);
path = glslang;
sourceTree = "<group>";
@@ -3919,8 +3919,6 @@
FAF13FC61E20934C00F898D2 /* BaseTypes.h */,
FAF13FC71E20934C00F898D2 /* Common.h */,
FAF13FC81E20934C00F898D2 /* ConstantUnion.h */,
FA84DE5E2778D7DC002674C6 /* glslang_c_interface.h */,
FA84DE5F2778D7DC002674C6 /* glslang_c_shader_types.h */,
FAF13FC91E20934C00F898D2 /* InfoSink.h */,
FAF13FCA1E20934C00F898D2 /* InitializeGlobals.h */,
FAF13FCB1E20934C00F898D2 /* intermediate.h */,
@@ -3972,6 +3970,7 @@
FAF13FFB1E20934C00F898D2 /* Scan.h */,
FAF13FFC1E20934C00F898D2 /* ScanContext.h */,
FAF13FFD1E20934C00F898D2 /* ShaderLang.cpp */,
D9DB6E282B4B40970037A1F6 /* span.h */,
FA84DE602778D7F3002674C6 /* SpirvIntrinsics.cpp */,
FAF13FFE1E20934C00F898D2 /* SymbolTable.cpp */,
FAF13FFF1E20934C00F898D2 /* SymbolTable.h */,
@@ -4015,20 +4014,12 @@
FAF140281E20934C00F898D2 /* Public */ = {
isa = PBXGroup;
children = (
D9DB6E252B4B40660037A1F6 /* ResourceLimits.h */,
FAF140291E20934C00F898D2 /* ShaderLang.h */,
);
path = Public;
sourceTree = "<group>";
};
FAF1403A1E20934C00F898D2 /* OGLCompilersDLL */ = {
isa = PBXGroup;
children = (
FAF1403B1E20934C00F898D2 /* InitializeDll.cpp */,
FAF1403C1E20934C00F898D2 /* InitializeDll.h */,
);
path = OGLCompilersDLL;
sourceTree = "<group>";
};
FAF6C9C023C2DE2900D7B5BC /* SPIRV */ = {
isa = PBXGroup;
children = (
@@ -4038,9 +4029,11 @@
FAF6C9D823C2DE2900D7B5BC /* doc.cpp */,
FAF6C9C823C2DE2900D7B5BC /* doc.h */,
FAF6C9C723C2DE2900D7B5BC /* GLSL.ext.AMD.h */,
D9DB6E3A2B4B41570037A1F6 /* GLSL.ext.ARM.h */,
FAF6C9CB23C2DE2900D7B5BC /* GLSL.ext.EXT.h */,
FAF6C9CC23C2DE2900D7B5BC /* GLSL.ext.KHR.h */,
FAF6C9CD23C2DE2900D7B5BC /* GLSL.ext.NV.h */,
D9DB6E3B2B4B41580037A1F6 /* GLSL.ext.QCOM.h */,
FAF6C9D323C2DE2900D7B5BC /* GLSL.std.450.h */,
FAF6C9CE23C2DE2900D7B5BC /* GlslangToSpv.cpp */,
FAF6C9D223C2DE2900D7B5BC /* GlslangToSpv.h */,
@@ -4048,6 +4041,8 @@
FAF6C9C623C2DE2900D7B5BC /* InReadableOrder.cpp */,
FAF6C9D523C2DE2900D7B5BC /* Logger.cpp */,
FAF6C9D723C2DE2900D7B5BC /* Logger.h */,
D9DB6E382B4B41570037A1F6 /* NonSemanticDebugPrintf.h */,
D9DB6E392B4B41570037A1F6 /* NonSemanticShaderDebugInfo100.h */,
FAF6C9C923C2DE2900D7B5BC /* spirv.hpp */,
FAF6C9CA23C2DE2900D7B5BC /* SpvBuilder.cpp */,
FAF6C9C223C2DE2900D7B5BC /* SpvBuilder.h */,
@@ -4105,6 +4100,7 @@
FAF6C9EF23C2DE2900D7B5BC /* disassemble.h in Headers */,
FA18CF4123DCF67900263725 /* spirv_common.hpp in Headers */,
FAC7CD901FE35E95006A60C7 /* physfs_miniz.h in Headers */,
D9DB6E3F2B4B41580037A1F6 /* NonSemanticShaderDebugInfo100.h in Headers */,
FA0B791D1A958E3B000E1D17 /* b64.h in Headers */,
FA0B7DC61A95902C000E1D17 /* wrap_JoystickModule.h in Headers */,
FA0B7D201A95902C000E1D17 /* ImageRasterizer.h in Headers */,
@@ -4123,6 +4119,7 @@
FAF140871E20934C00F898D2 /* parseVersions.h in Headers */,
FA0B7AC61A958EA3000E1D17 /* types.h in Headers */,
FA0B7DBD1A95902C000E1D17 /* Joystick.h in Headers */,
D9DB6E452B4B80E80037A1F6 /* build_info.h in Headers */,
FA0B7D0E1A95902C000E1D17 /* wrap_Filesystem.h in Headers */,
FA0B7EE41A95902D000E1D17 /* Window.h in Headers */,
FA0B7CFC1A95902C000E1D17 /* Filesystem.h in Headers */,
@@ -4155,7 +4152,6 @@
FAF140AB1E20934C00F898D2 /* SymbolTable.h in Headers */,
FA18CF1E23DCF67900263725 /* external_interface.h in Headers */,
FA0B7ED71A95902D000E1D17 /* Timer.h in Headers */,
FA18CF3723DCF67900263725 /* spirv.h in Headers */,
FA0B7AC31A958EA3000E1D17 /* list.h in Headers */,
FA0B7B2D1A958EA3000E1D17 /* core.h in Headers */,
FA1E88841DF363DB00E808AA /* Filter.h in Headers */,
@@ -4221,6 +4217,7 @@
FABDA9BE2552448300B5C523 /* Box2D.h in Headers */,
D9DAB9222961F0EE00C64820 /* HarfbuzzShaper.h in Headers */,
FA56AA3A1FAFF02000A43D5F /* memory.h in Headers */,
D99081EE2BB2473900D2B0E4 /* JoystickSDL3.h in Headers */,
FA0B7E441A95902C000E1D17 /* wrap_CircleShape.h in Headers */,
FA0B7EB41A95902C000E1D17 /* System.h in Headers */,
FAF1405A1E20934C00F898D2 /* ConstantUnion.h in Headers */,
@@ -4272,7 +4269,6 @@
FAFEB29B28F210550025D7D0 /* unixdgram.h in Headers */,
FA0B7E051A95902C000E1D17 /* Contact.h in Headers */,
FA4F2BE41DE6650600CA37D7 /* Transform.h in Headers */,
FA0B7E0E1A95902C000E1D17 /* Fixture.h in Headers */,
FA6A2B661F5F7B6B0074C308 /* wrap_Data.h in Headers */,
FA18CEE423DBC6E000263725 /* Graphics.h in Headers */,
217DFBE81D9F6D490055D849 /* inet.h in Headers */,
@@ -4312,12 +4308,14 @@
FA0B7AC81A958EA3000E1D17 /* utility.h in Headers */,
FABDA9BA2552448300B5C523 /* b2_weld_joint.h in Headers */,
FA522D5323F9FF2A0059EE3C /* dr_mp3.h in Headers */,
D9DB6E272B4B40660037A1F6 /* ResourceLimits.h in Headers */,
FA0B791F1A958E3B000E1D17 /* Data.h in Headers */,
FA18CF4523DD1A8100263725 /* ShaderStage.h in Headers */,
217DFBE41D9F6D490055D849 /* headers.lua.h in Headers */,
FA0B7D021A95902C000E1D17 /* Filesystem.h in Headers */,
FA0B7E471A95902C000E1D17 /* wrap_Contact.h in Headers */,
FA0B7E021A95902C000E1D17 /* CircleShape.h in Headers */,
D9DB6E3E2B4B41580037A1F6 /* NonSemanticDebugPrintf.h in Headers */,
FABDA9E92552448300B5C523 /* b2_timer.h in Headers */,
FA0B7E111A95902C000E1D17 /* FrictionJoint.h in Headers */,
FA0B7AE01A958EA3000E1D17 /* lodepng.h in Headers */,
@@ -4377,6 +4375,7 @@
FA0B7DC31A95902C000E1D17 /* wrap_Joystick.h in Headers */,
FA18CF3B23DCF67900263725 /* spirv_cross_util.hpp in Headers */,
FAF140631E20934C00F898D2 /* Types.h in Headers */,
D9DB6E292B4B40970037A1F6 /* span.h in Headers */,
FACA06AF293EE5CD001A2557 /* Sensor.h in Headers */,
FA4F2BE61DE6650600CA37D7 /* wrap_Transform.h in Headers */,
FA0B7EE71A95902D000E1D17 /* Window.h in Headers */,
@@ -4393,12 +4392,10 @@
FABDA9DD2552448300B5C523 /* b2_contact.h in Headers */,
FABDA9802552448200B5C523 /* b2_circle_contact.h in Headers */,
217DFC101D9F6D490055D849 /* url.lua.h in Headers */,
FAF140DD1E20934C00F898D2 /* InitializeDll.h in Headers */,
FA0B7DF31A95902C000E1D17 /* wrap_Cursor.h in Headers */,
FA18CF2023DCF67900263725 /* spirv_hlsl.hpp in Headers */,
FA0B7D271A95902C000E1D17 /* wrap_Font.h in Headers */,
FA0B7DAA1A95902C000E1D17 /* PVRHandler.h in Headers */,
FA18CF3823DCF67900263725 /* spirv_cross_c.h in Headers */,
FA27B3B51B498151008A9DCE /* wrap_Video.h in Headers */,
FABDA9BC2552448300B5C523 /* b2_fixture.h in Headers */,
FA0B7D7B1A95902C000E1D17 /* Quad.h in Headers */,
@@ -4452,6 +4449,7 @@
217DFC021D9F6D490055D849 /* tcp.h in Headers */,
FA3C5E441F8C368C0003C579 /* ShaderStage.h in Headers */,
FA0B79261A958E3B000E1D17 /* Exception.h in Headers */,
D9DB6E402B4B41580037A1F6 /* GLSL.ext.ARM.h in Headers */,
FA0B7D4D1A95902C000E1D17 /* Shader.h in Headers */,
FA0B793D1A958E3B000E1D17 /* runtime.h in Headers */,
FAF6C9E323C2DE2900D7B5BC /* GLSL.ext.AMD.h in Headers */,
@@ -4467,7 +4465,6 @@
FA4F2B7A1DE0125B00CA37D7 /* xxhash.h in Headers */,
FA0B7DDE1A95902C000E1D17 /* wrap_BezierCurve.h in Headers */,
FA0B7DED1A95902C000E1D17 /* Cursor.h in Headers */,
FA0B7E501A95902C000E1D17 /* wrap_Fixture.h in Headers */,
FA28EBD71E352DB5003446F4 /* FenceSync.h in Headers */,
FADF542C1E3DAADA00012CC0 /* wrap_Mesh.h in Headers */,
FAA3A9B01B7D465A00CED060 /* android.h in Headers */,
@@ -4479,6 +4476,7 @@
FA6BDF90281219E900240F2A /* DataStream.h in Headers */,
FAF6C9DB23C2DE2900D7B5BC /* SpvBuilder.h in Headers */,
FA0B7EA21A95902C000E1D17 /* Sound.h in Headers */,
D9DB6E412B4B41580037A1F6 /* GLSL.ext.QCOM.h in Headers */,
FA0B7B331A958EA3000E1D17 /* wuff_config.h in Headers */,
FA0B7D3B1A95902C000E1D17 /* Graphics.h in Headers */,
FA0B7E6E1A95902C000E1D17 /* wrap_RevoluteJoint.h in Headers */,
@@ -4652,6 +4650,7 @@
FAF140A81E20934C00F898D2 /* ShaderLang.cpp in Sources */,
FA1BA09E1E16CFCE00AA2803 /* Font.cpp in Sources */,
FABDA9A12552448300B5C523 /* b2_gear_joint.cpp in Sources */,
D9DB6E372B4B41100037A1F6 /* ResourceLimits.cpp in Sources */,
FAE64A8A2071363100BC7981 /* physfs_archiver_wad.c in Sources */,
FA18CF4723DD1A8100263725 /* ShaderStage.mm in Sources */,
FA0B7ECC1A95902C000E1D17 /* wrap_Channel.cpp in Sources */,
@@ -4707,7 +4706,6 @@
FA3C5E431F8C368C0003C579 /* ShaderStage.cpp in Sources */,
FA0B7E191A95902C000E1D17 /* MotorJoint.cpp in Sources */,
FAF1406F1E20934C00F898D2 /* Initialize.cpp in Sources */,
FA0B7E4F1A95902C000E1D17 /* wrap_Fixture.cpp in Sources */,
FA0B7EBF1A95902C000E1D17 /* Thread.cpp in Sources */,
FACA02F91F5E39790084B28F /* Compressor.cpp in Sources */,
FABDAA002552448300B5C523 /* b2_time_of_impact.cpp in Sources */,
@@ -4725,7 +4723,6 @@
FA4F2C111DE936FE00CA37D7 /* unix.c in Sources */,
FA1BA0A31E16D97500AA2803 /* wrap_Font.cpp in Sources */,
FABDA9842552448200B5C523 /* b2_chain_polygon_contact.cpp in Sources */,
FA0B7E0D1A95902C000E1D17 /* Fixture.cpp in Sources */,
FADF53FE1E3D74F200012CC0 /* TextBatch.cpp in Sources */,
FA0B7D191A95902C000E1D17 /* TrueTypeRasterizer.cpp in Sources */,
FAC271E723B5B5B400C200D3 /* renderstate.cpp in Sources */,
@@ -4746,6 +4743,7 @@
FA0B7CE61A95902C000E1D17 /* wrap_Source.cpp in Sources */,
FA9D8DDE1DEF842A002CD881 /* Drawable.cpp in Sources */,
FA0B7CCE1A95902C000E1D17 /* Audio.cpp in Sources */,
D99081F02BB2473900D2B0E4 /* JoystickSDL3.cpp in Sources */,
FADF54031E3D77B500012CC0 /* wrap_TextBatch.cpp in Sources */,
FA0B7DCB1A95902C000E1D17 /* Keyboard.cpp in Sources */,
FA0B7DFB1A95902C000E1D17 /* Body.cpp in Sources */,
@@ -4764,7 +4762,6 @@
FAF140AD1E20934C00F898D2 /* Versions.cpp in Sources */,
FA0B793C1A958E3B000E1D17 /* runtime.cpp in Sources */,
FA6BDF8A280B62A000240F2A /* GraphicsReadback.mm in Sources */,
FAF140DC1E20934C00F898D2 /* InitializeDll.cpp in Sources */,
FA0B7DBC1A95902C000E1D17 /* Joystick.cpp in Sources */,
FA0B7DAF1A95902C000E1D17 /* wrap_CompressedImageData.cpp in Sources */,
FA0B7AD51A958EA3000E1D17 /* unix.c in Sources */,
@@ -5015,7 +5012,6 @@
FACA02F81F5E39760084B28F /* CompressedData.cpp in Sources */,
FA0B7ADA1A958EA3000E1D17 /* glad.cpp in Sources */,
FAF140541E20934C00F898D2 /* CodeGen.cpp in Sources */,
FA18CF2F23DCF67900263725 /* spirv_cross_c.cpp in Sources */,
FA0B7E1F1A95902C000E1D17 /* Physics.cpp in Sources */,
FA6A2B7B1F60B8250074C308 /* wrap_ByteData.cpp in Sources */,
FA0B7E821A95902C000E1D17 /* Shape.cpp in Sources */,
@@ -5083,6 +5079,7 @@
FA0B7D7C1A95902C000E1D17 /* Texture.cpp in Sources */,
FAF140BB1E20934C00F898D2 /* ossource.cpp in Sources */,
FA0B7ECB1A95902C000E1D17 /* wrap_Channel.cpp in Sources */,
D9DB6E362B4B41100037A1F6 /* ResourceLimits.cpp in Sources */,
FACA02F21F5E396B0084B28F /* HashFunction.cpp in Sources */,
FABDA9A02552448300B5C523 /* b2_gear_joint.cpp in Sources */,
FAF140A71E20934C00F898D2 /* ShaderLang.cpp in Sources */,
@@ -5140,7 +5137,6 @@
FAF140971E20934C00F898D2 /* PpTokens.cpp in Sources */,
FAF140A91E20934C00F898D2 /* SymbolTable.cpp in Sources */,
FA0B7E181A95902C000E1D17 /* MotorJoint.cpp in Sources */,
FA0B7E4E1A95902C000E1D17 /* wrap_Fixture.cpp in Sources */,
FA18CEC523D3AE6700263725 /* wrap_Buffer.cpp in Sources */,
FAF6C9F423C2DE2900D7B5BC /* Logger.cpp in Sources */,
FABDA9FF2552448300B5C523 /* b2_time_of_impact.cpp in Sources */,
@@ -5159,7 +5155,6 @@
FABDA9832552448200B5C523 /* b2_chain_polygon_contact.cpp in Sources */,
FA0B7AD61A958EA3000E1D17 /* win32.c in Sources */,
FADF54341E3DAE6E00012CC0 /* wrap_SpriteBatch.cpp in Sources */,
FA0B7E0C1A95902C000E1D17 /* Fixture.cpp in Sources */,
FA0B7D181A95902C000E1D17 /* TrueTypeRasterizer.cpp in Sources */,
FA84DE6627791C36002674C6 /* GraphicsReadback.cpp in Sources */,
FA0B7CFA1A95902C000E1D17 /* Filesystem.cpp in Sources */,
@@ -5177,6 +5172,7 @@
FA0B7E421A95902C000E1D17 /* wrap_CircleShape.cpp in Sources */,
FA0B7CE51A95902C000E1D17 /* wrap_Source.cpp in Sources */,
FAC7CD921FE35E95006A60C7 /* physfs_archiver_hog.c in Sources */,
D99081EF2BB2473900D2B0E4 /* JoystickSDL3.cpp in Sources */,
FAF140931E20934C00F898D2 /* PpScanner.cpp in Sources */,
FA9D53AC1F5307E900125C6B /* Deprecations.cpp in Sources */,
FA0B7CCD1A95902C000E1D17 /* Audio.cpp in Sources */,
@@ -5206,7 +5202,6 @@
FAC7CD811FE35E95006A60C7 /* physfs_platform_os2.c in Sources */,
FABDA9962552448300B5C523 /* b2_distance_joint.cpp in Sources */,
FA0B7DBB1A95902C000E1D17 /* Joystick.cpp in Sources */,
FAF140DB1E20934C00F898D2 /* InitializeDll.cpp in Sources */,
FA0B7DAE1A95902C000E1D17 /* wrap_CompressedImageData.cpp in Sources */,
FA6A2B701F5F845F0074C308 /* wrap_DataView.cpp in Sources */,
FAB17BE61ABFAA9000F9BA27 /* lz4.c in Sources */,
@@ -5304,7 +5299,6 @@
FA0B7E301A95902C000E1D17 /* Shape.cpp in Sources */,
FA93C4541F315B960087CCD4 /* FormatHandler.cpp in Sources */,
FA0B7E481A95902C000E1D17 /* wrap_DistanceJoint.cpp in Sources */,
FA18CF2E23DCF67900263725 /* spirv_cross_c.cpp in Sources */,
FABDA9A72552448300B5C523 /* b2_motor_joint.cpp in Sources */,
FA0B792F1A958E3B000E1D17 /* Module.cpp in Sources */,
FA0B7E2A1A95902C000E1D17 /* RevoluteJoint.cpp in Sources */,
@@ -5529,9 +5523,9 @@
"\"$(SRCROOT)/../../src/modules\"",
"\"$(SRCROOT)/../../src/libraries/enet/libenet/include\"",
);
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.15;
ONLY_ACTIVE_ARCH = NO;
SDKROOT = macosx;
USE_HEADERMAP = NO;
@@ -5595,9 +5589,9 @@
"\"$(SRCROOT)/../../src/modules\"",
"\"$(SRCROOT)/../../src/libraries/enet/libenet/include\"",
);
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.15;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
USE_HEADERMAP = NO;
@@ -5733,10 +5727,10 @@
"\"$(SRCROOT)/../../src/modules\"",
"\"$(SRCROOT)/../../src/libraries/enet/libenet/include\"",
);
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LIBRARY_SEARCH_PATHS = "";
LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.15;
ONLY_ACTIVE_ARCH = NO;
SDKROOT = macosx;
USE_HEADERMAP = NO;
@@ -562,9 +562,9 @@
"\"$(SRCROOT)/../../src/modules\"",
);
INFOPLIST_FILE = "love-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.15;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = love;
SDKROOT = macosx;
@@ -637,10 +637,10 @@
"\"$(SRCROOT)/../../src/modules\"",
);
INFOPLIST_FILE = "love-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.15;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = love;
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
@@ -871,10 +871,10 @@
"\"$(SRCROOT)/../../src/modules\"",
);
INFOPLIST_FILE = "love-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.15;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = love;
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
+1 -1
View File
@@ -70,7 +70,7 @@
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>© 2006-2023 LÖVE Development Team</string>
<string>© 2006-2024 LÖVE Development Team</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
+20 -17
View File
@@ -11,12 +11,13 @@ If you need further help, feel free to ask on our [forums][forums], our [Discord
Repository
----------
We use the 'main' branch for patch development of the current major release, and therefore it should not be considered stable.
There may also be a branch for the next major version in development, which is named after that version.
We use the 'main' branch for development of the next major release, and therefore it should not be considered stable.
There are also branches for currently released major versions, which may have fixes and changes meant for upcoming patch releases within that major version.
We tag all our releases (since we started using mercurial and git), and have binary downloads available for them.
Experimental changes are developed in a separate [love-experiments][love-experiments] repository.
Experimental changes are sometimes developed in a separate [love-experiments][love-experiments] repository.
Builds
------
@@ -29,6 +30,15 @@ There are also unstable/nightly builds:
- For ubuntu linux they are in [ppa:bartbes/love-unstable][unstableppa]
- For arch linux there's [love-git][aur] in the AUR.
Test Suite
----------
The test suite in `testing/` covers all the LÖVE APIs, and tests them the same way developers use them. You can view current test coverage from any [action][workflows].
You can run the suite locally like you would run a normal LÖVE project, e.g.:
`love testing`
See the [readme][testsuite] in the testing folder for more info.
Contributing
------------
@@ -44,13 +54,13 @@ Compilation
Follow the instructions at the [megasource][megasource] repository page.
### *nix
Run `platform/unix/automagic` from the repository root, then run ./configure and make.
Because in-tree builds are not allowed, the Makefiles needs to be generated in a separate build directory. In this example, folder named `build` is used:
$ platform/unix/automagic
$ ./configure
$ make
$ cmake -B build -S. --install-prefix $PWD/prefix # this will create the directory `build/`.
$ cmake --build build --target install -j$(nproc) # this will build with all cores and put the files in `prefix/`.
When using a source release, automagic has already been run, and the first step can be skipped.
> [!NOTE]
> CMake 3.15 and earlier doesn't support `--install-prefix`. In that case, use `-DCMAKE_INSTALL_PREFIX=` instead.
### macOS
Download or clone [this repository][dependencies-apple] and copy, move, or symlink the `macOS/Frameworks` subfolder into love's `platform/xcode/macosx` folder.
@@ -60,7 +70,6 @@ Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the
### iOS
Building for iOS requires macOS and Xcode.
#### LÖVE 11.4 and newer
Download the `love-apple-dependencies` zip file corresponding to the LÖVE version being used from the [Releases page][dependencies-ios],
unzip it, and place the `iOS/libraries` subfolder into love's `platform/xcode/ios` folder.
@@ -70,14 +79,6 @@ Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the
See `readme-iOS.rtf` for more information.
#### LÖVE 11.3 and older
Download the `ios-libraries` zip file corresponding to the LÖVE version being used from the [Releases page][dependencies-ios],
unzip it, and place the `include` and `libraries` subfolders into love's `platform/xcode/ios` folder.
Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-ios` target.
See `readme-iOS.rtf` for more information.
### Android
Visit the [Android build repository][android-repository] for build instructions.
@@ -107,3 +108,5 @@ Dependencies
[codestyle]: https://love2d.org/wiki/Code_Style
[android-repository]: https://github.com/love2d/love-android
[releases]: https://github.com/love2d/love/releases
[testsuite]: https://github.com/love2d/love/tree/main/testing
[workflows]: https://github.com/love2d/love/actions/workflows/main.yml?query=branch%3Amain
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+18 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -20,10 +20,27 @@
// LOVE
#include "Data.h"
#include "thread/threads.h"
namespace love
{
love::Type Data::type("Data", &Object::type);
Data::~Data()
{
delete mutex;
}
static void createMutex(love::thread::Mutex **mutexAddress)
{
*mutexAddress = love::thread::newMutex();
}
love::thread::Mutex *Data::getMutex()
{
std::call_once(mutexCreated, createMutex, &mutex);
return mutex;
}
} // love
+20 -6
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -22,15 +22,20 @@
#define LOVE_DATA_H
// LOVE
#include "config.h"
#include "Object.h"
// C
#include <stddef.h>
#include <mutex>
namespace love
{
namespace thread
{
class Mutex;
}
/**
* This class is a simple abstraction over all objects which contain data.
**/
@@ -40,10 +45,8 @@ public:
static love::Type type;
/**
* Destructor.
**/
virtual ~Data() {}
Data() {};
virtual ~Data();
/**
* Creates a duplicate of Data derived class instance.
@@ -60,6 +63,17 @@ public:
**/
virtual size_t getSize() const = 0;
/**
* Gets the Mutex associated with this Data object. Creates it in a thread-
* safe manner if necessary.
**/
love::thread::Mutex *getMutex();
private:
love::thread::Mutex *mutex = nullptr;
std::once_flag mutexCreated;
}; // Data
} // love
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+5 -2
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -62,9 +62,12 @@ namespace love
love::Type Module::type("Module", &Object::type);
Module *Module::instances[] = {};
Module::Module()
Module::Module(Module::ModuleType moduleType, const char *name)
: moduleType(moduleType)
, name(name)
{
initDeprecation();
registerInstance(this);
}
Module::~Module()
+9 -11
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -62,13 +62,13 @@ public:
M_MAX_ENUM
};
Module();
Module(ModuleType moduleType, const char *name);
virtual ~Module();
/**
* Gets the base type of the module.
**/
virtual ModuleType getModuleType() const = 0;
ModuleType getModuleType() const { return moduleType; }
/**
* Gets the name of the module. This is used in case of errors
@@ -76,14 +76,7 @@ public:
*
* @return The full name of the module, eg. love.graphics.opengl.
**/
virtual const char *getName() const = 0;
/**
* Add module to internal registry. To be used /only/ in
* runtime.cpp:luax_register_module()
* @param instance The module instance.
*/
static void registerInstance(Module *instance);
const char *getName() const { return name.c_str(); }
/**
* Retrieve module instance from internal registry. May return NULL
@@ -106,6 +99,11 @@ public:
private:
static void registerInstance(Module *instance);
ModuleType moduleType;
std::string name;
static Module *instances[M_MAX_ENUM];
}; // Module
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+2 -2
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -46,7 +46,7 @@ struct Optional
hasValue = true;
}
T get(T defaultVal)
T get(T defaultVal) const
{
return hasValue ? value : defaultVal;
}
+2 -2
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -61,7 +61,7 @@ struct Range
return first <= other.first && last >= other.last;
}
bool intersects(const Range &other)
bool intersects(const Range &other) const
{
return !(first > other.last || last < other.first);
}
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+90 -31
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -24,6 +24,7 @@
#ifdef LOVE_ANDROID
#include <cerrno>
#include <set>
#include <unordered_map>
#include <SDL.h>
@@ -121,19 +122,7 @@ bool getSafeArea(int &top, int &left, int &bottom, int &right)
bool openURL(const std::string &url)
{
JNIEnv *env = (JNIEnv*) SDL_AndroidGetJNIEnv();
jobject activity = (jobject) SDL_AndroidGetActivity();
jclass clazz = env->GetObjectClass(activity);
static jmethodID openURL = env->GetMethodID(clazz, "openURLFromLOVE", "(Ljava/lang/String;)Z");
jstring jstringURL = env->NewStringUTF(url.c_str());
jboolean result = env->CallBooleanMethod(clazz, openURL, jstringURL);
env->DeleteLocalRef(jstringURL);
env->DeleteLocalRef(clazz);
env->DeleteLocalRef(activity);
return (bool) result;
return SDL_OpenURL(url.c_str()) == 0;
}
void vibrate(double seconds)
@@ -174,31 +163,100 @@ bool directoryExists(const char *path)
bool mkdir(const char *path)
{
int err = ::mkdir(path, 0770);
int err = ::mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO | S_ISGID);
if (err == -1)
{
SDL_Log("Error: Could not create directory %s", path);
const char *error = strerror(errno);
SDL_Log("Error: Could not create directory '%s': %s", path, error);
return false;
}
return true;
}
bool chmod(const char *path, int mode)
{
int err = ::chmod(path, mode);
if (err == -1)
{
const char *error = strerror(errno);
SDL_Log("Error: Could not change mode '%s': %s", path, error);
return false;
}
return true;
}
inline bool tryCreateDirectory(const char *path)
{
SDL_Log("Trying to create directory '%s'", path);
if (directoryExists(path))
return true;
else if (mkdir(path))
return true;
return false;
}
bool createStorageDirectories()
{
std::string internal_storage_path = SDL_AndroidGetInternalStoragePath();
std::string internalStoragePath = SDL_AndroidGetInternalStoragePath();
std::string externalStoragePath = SDL_AndroidGetExternalStoragePath();
std::string save_directory = internal_storage_path + "/save";
if (!directoryExists(save_directory.c_str()) && !mkdir(save_directory.c_str()))
std::string saveDirectoryInternal = internalStoragePath + "/save";
if (!tryCreateDirectory(saveDirectoryInternal.c_str()))
return false;
std::string game_directory = internal_storage_path + "/game";
if (!directoryExists (game_directory.c_str()) && !mkdir(game_directory.c_str()))
std::string saveDirectoryExternal = externalStoragePath + "/save";
if (!tryCreateDirectory(saveDirectoryExternal.c_str()))
return false;
std::string game_directory = externalStoragePath + "/game";
if (!tryCreateDirectory (game_directory.c_str()))
return false;
return true;
}
void fixupPermissionSingleFile(const std::string &savedir, const std::string &path, int mode)
{
std::string fixedSavedir = savedir.back() == '/' ? savedir : (savedir + "/");
std::string target = fixedSavedir + path;
::chmod(target.c_str(), mode);
}
void fixupExternalStoragePermission(const std::string &savedir, const std::string &path)
{
std::set<std::string> pathsToFix;
size_t start = 0;
while (true)
{
size_t pos = path.find('/', start);
if (pos == std::string::npos)
{
pathsToFix.insert(path);
break;
}
pathsToFix.insert(path.substr(0, pos));
start = pos + 1;
}
std::string fixedSavedir = savedir.back() == '/' ? savedir : (savedir + "/");
chmod(savedir.c_str(), S_IRWXU | S_IRWXG | S_IRWXO | S_ISGID);
for (const std::string &dir: pathsToFix)
{
const char *realPath = PHYSFS_getRealDir(dir.c_str());
if (!dir.empty() && strcmp(realPath, savedir.c_str()) == 0)
{
std::string target = fixedSavedir + dir;
chmod(target.c_str(), S_IRWXU | S_IRWXG | S_IRWXO | S_ISGID);
}
}
}
bool hasBackgroundMusic()
{
JNIEnv *env = (JNIEnv*) SDL_AndroidGetJNIEnv();
@@ -385,18 +443,20 @@ struct AssetInfo: public love::filesystem::physfs::PhysfsIo<AssetInfo>
return 1;
}
AssetInfo *duplicate() const
AssetInfo(const AssetInfo &other)
: assetManager(other.assetManager)
, size(strlen(other.filename) + 1)
{
AAsset *newAsset = AAssetManager_open(assetManager, filename, AASSET_MODE_RANDOM);
asset = AAssetManager_open(assetManager, other.filename, AASSET_MODE_RANDOM);
if (newAsset == nullptr)
if (asset == nullptr)
{
PHYSFS_setErrorCode(PHYSFS_ERR_OS_ERROR);
return nullptr;
throw new love::Exception("Unable to duplicate AssetInfo");
}
AAsset_seek64(asset, tell(), SEEK_SET);
return fromAAsset(assetManager, filename, asset);
filename = new (std::nothrow) char[size];
memcpy(filename, other.filename, size);
}
~AssetInfo() override
@@ -867,10 +927,9 @@ void *getIOFromFD(int fd)
const char *getArg0()
{
static PHYSFS_AndroidInit androidInit = {
SDL_AndroidGetJNIEnv(),
SDL_AndroidGetActivity()
};
static PHYSFS_AndroidInit androidInit = {nullptr, nullptr};
androidInit.jnienv = SDL_AndroidGetJNIEnv();
androidInit.context = SDL_AndroidGetActivity();
return (const char *) &androidInit;
}
+5 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -65,6 +65,10 @@ bool mkdir(const char *path);
bool createStorageDirectories();
void fixupPermissionSingleFile(const std::string &savedir, const std::string &path, int mode = 0666);
void fixupExternalStoragePermission(const std::string &savedir, const std::string &path);
bool hasBackgroundMusic();
bool hasRecordingPermission();
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+4 -2
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -102,7 +102,7 @@
#endif
// DLL-stuff.
#if defined(_MSC_VER)
#if defined(_MSC_VER) || defined(__MINGW32__)
# define LOVE_EXPORT __declspec(dllexport)
#elif defined(__GNUC__) || defined(__clang__)
# define LOVE_EXPORT __attribute__((visibility("default")))
@@ -114,8 +114,10 @@
#ifndef LOVE_WINDOWS_UWP
# define LOVE_LEGENDARY_CONSOLE_IO_HACK
#endif // LOVE_WINDOWS_UWP
#ifndef __MINGW32__
# define NOMINMAX
#endif
#endif
#if defined(LOVE_MACOS) || defined(LOVE_IOS)
# define LOVE_LEGENDARY_APP_ARGV_HACK
+9 -3
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -21,15 +21,21 @@
#include "delay.h"
#include <SDL_timer.h>
#include <SDL_version.h>
namespace love
{
void sleep(unsigned int ms)
// TODO: use ns.
void sleep(double ms)
{
// We don't need to initialize the SDL timer subsystem for SDL_Delay to
// function - and doing so causes SDL to create a worker thread.
SDL_Delay(ms);
#if SDL_VERSION_ATLEAST(3, 0, 0)
SDL_DelayNS(SDL_MS_TO_NS(ms));
#else
SDL_Delay((Uint32)ms);
#endif
}
} // love
+2 -2
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -24,7 +24,7 @@
namespace love
{
void sleep(unsigned int ms);
void sleep(double ms);
} // namespace love
+7 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -107,8 +107,12 @@ std::string getDeprecationNotice(const DeprecationInfo &info, bool usewhere)
if (info.apiType == API_FUNCTION)
notice << "function ";
else if (info.apiType == API_FUNCTION_VARIANT)
notice << "function variant in ";
else if (info.apiType == API_METHOD)
notice << "method ";
else if (info.apiType == API_METHOD_VARIANT)
notice << "method variant in ";
else if (info.apiType == API_CALLBACK)
notice << "callback ";
else if (info.apiType == API_FIELD)
@@ -188,7 +192,9 @@ MarkDeprecated::~MarkDeprecated()
STRINGMAP_BEGIN(APIType, API_MAX_ENUM, apiType)
{
{ "function", API_FUNCTION },
{ "functionvariant", API_FUNCTION_VARIANT },
{ "method", API_METHOD },
{ "methodvariant", API_METHOD_VARIANT },
{ "callback", API_CALLBACK },
{ "field", API_FIELD },
{ "constant", API_CONSTANT },
+3 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -32,7 +32,9 @@ namespace love
enum APIType
{
API_FUNCTION,
API_FUNCTION_VARIANT,
API_METHOD,
API_METHOD_VARIANT,
API_CALLBACK,
API_FIELD,
API_CONSTANT,
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+3 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -149,6 +149,8 @@ static NSArray *getLovesInDocuments()
[paths addObject:path.stringByDeletingLastPathComponent];
}
[paths sortUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
return paths;
}
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+16 -5
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -26,12 +26,9 @@
#import <Cocoa/Cocoa.h>
#import <QuartzCore/CAMetalLayer.h>
#ifdef LOVE_MACOSX_SDL_DIRECT_INCLUDE
#include <SDL.h>
#if !SDL_VERSION_ATLEAST(3, 0, 0)
#include <SDL_syswm.h>
#else
#include <SDL2/SDL.h>
#include <SDL2/SDL_syswm.h>
#endif
namespace love
@@ -63,6 +60,13 @@ std::string checkDropEvents()
SDL_InitSubSystem(SDL_INIT_VIDEO);
SDL_PumpEvents();
#if SDL_VERSION_ATLEAST(3, 0, 0)
if (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_EVENT_DROP_FILE, SDL_EVENT_DROP_FILE) > 0)
{
if (event.type == SDL_EVENT_DROP_FILE)
dropstr = std::string(event.drop.data);
}
#else
if (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_DROPFILE, SDL_DROPFILE) > 0)
{
if (event.type == SDL_DROPFILE)
@@ -71,6 +75,7 @@ std::string checkDropEvents()
SDL_free(event.drop.file);
}
}
#endif
SDL_QuitSubSystem(SDL_INIT_VIDEO);
@@ -122,9 +127,15 @@ void setWindowSRGBColorSpace(SDL_Window *window)
// (at least, it was back when I tested in December 2016).
if (@available(macOS 11.0, *))
{
#if SDL_VERSION_ATLEAST(3, 0, 0)
SDL_PropertiesID props = SDL_GetWindowProperties(window);
NSWindow *window = (__bridge NSWindow *) SDL_GetProperty(props, SDL_PROP_WINDOW_COCOA_WINDOW_POINTER, nullptr);
window.colorSpace = [NSColorSpace sRGBColorSpace];
#else
SDL_SysWMinfo info = {};
if (SDL_GetWindowWMInfo(window, &info))
info.info.cocoa.window.colorSpace = [NSColorSpace sRGBColorSpace];
#endif
}
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+218 -113
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -26,101 +26,126 @@ namespace love
static PixelFormatInfo formatInfo[] =
{
// components, blockW, blockH, blockSize, color, depth, stencil, compressed, dataType
{ 0, 1, 1, 0, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_UNKNOWN
// components, blockW, blockH, blockSize, color, depth, stencil, compressed, sRGB, dataType
{ 0, 1, 1, 0, false, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_UNKNOWN
{ 0, 1, 1, 0, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_NORMAL
{ 0, 1, 1, 0, true, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_HDR
{ 0, 1, 1, 0, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_NORMAL
{ 0, 1, 1, 0, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_HDR
{ 1, 1, 1, 1, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_R8_UNORM
{ 1, 1, 1, 1, true, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_R8_INT
{ 1, 1, 1, 1, true, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_R8_UINT
{ 1, 1, 1, 2, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_R16_UNORM
{ 1, 1, 1, 2, true, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_R16_FLOAT
{ 1, 1, 1, 2, true, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_R16_INT
{ 1, 1, 1, 2, true, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_R16_UINT
{ 1, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_R32_FLOAT
{ 1, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_R32_INT
{ 1, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_R32_UINT
{ 1, 1, 1, 1, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_R8_UNORM
{ 1, 1, 1, 1, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_R8_INT
{ 1, 1, 1, 1, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_R8_UINT
{ 1, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_R16_UNORM
{ 1, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_R16_FLOAT
{ 1, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_R16_INT
{ 1, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_R16_UINT
{ 1, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_R32_FLOAT
{ 1, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_R32_INT
{ 1, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_R32_UINT
{ 2, 1, 1, 2, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RG8_UNORM
{ 2, 1, 1, 2, true, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RG8_INT
{ 2, 1, 1, 2, true, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RG8_UINT
{ 2, 1, 1, 2, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_LA8_UNORM
{ 2, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RG16_UNORM
{ 2, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_RG16_FLOAT
{ 2, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RG16_INT
{ 2, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RG16_UINT
{ 2, 1, 1, 8, true, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_RG32_FLOAT
{ 2, 1, 1, 8, true, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RG32_INT
{ 2, 1, 1, 8, true, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RG32_UINT
{ 2, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RG8_UNORM
{ 2, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RG8_INT
{ 2, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RG8_UINT
{ 2, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_LA8_UNORM
{ 2, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RG16_UNORM
{ 2, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_RG16_FLOAT
{ 2, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RG16_INT
{ 2, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RG16_UINT
{ 2, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_RG32_FLOAT
{ 2, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RG32_INT
{ 2, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RG32_UINT
{ 4, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGBA8_UNORM
{ 4, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGBA8_UNORM_sRGB
{ 4, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BGRA8_UNORM
{ 4, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BGRA8_UNORM_sRGB
{ 4, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RGBA8_INT
{ 4, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RGBA8_UINT
{ 4, 1, 1, 8, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGBA16_UNORM
{ 4, 1, 1, 8, true, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_RGBA16_FLOAT
{ 4, 1, 1, 8, true, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RGBA16_INT
{ 4, 1, 1, 8, true, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RGBA16_UINT
{ 4, 1, 1, 16, true, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_RGBA32_FLOAT
{ 4, 1, 1, 16, true, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RGBA32_INT
{ 4, 1, 1, 16, true, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RGBA32_UINT
{ 4, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGBA8_UNORM
{ 4, 1, 1, 4, true, false, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGBA8_sRGB
{ 4, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BGRA8_UNORM
{ 4, 1, 1, 4, true, false, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BGRA8_sRGB
{ 4, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RGBA8_INT
{ 4, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RGBA8_UINT
{ 4, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGBA16_UNORM
{ 4, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_RGBA16_FLOAT
{ 4, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RGBA16_INT
{ 4, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RGBA16_UINT
{ 4, 1, 1, 16, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_RGBA32_FLOAT
{ 4, 1, 1, 16, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RGBA32_INT
{ 4, 1, 1, 16, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RGBA32_UINT
{ 4, 1, 1, 2, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGBA4_UNORM
{ 4, 1, 1, 2, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGB5A1_UNORM
{ 3, 1, 1, 2, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGB565_UNORM
{ 4, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGB10A2_UNORM
{ 3, 1, 1, 4, true, false, false, false, PIXELFORMATTYPE_UFLOAT }, // PIXELFORMAT_RG11B10_FLOAT
{ 4, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGBA4_UNORM
{ 4, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGB5A1_UNORM
{ 3, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGB565_UNORM
{ 4, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGB10A2_UNORM
{ 3, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UFLOAT }, // PIXELFORMAT_RG11B10_FLOAT
{ 1, 1, 1, 1, false, false, true , false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_STENCIL8
{ 1, 1, 1, 2, false, true, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DEPTH16_UNORM
{ 1, 1, 1, 3, false, true, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DEPTH24_UNORM
{ 1, 1, 1, 4, false, true, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_DEPTH32_FLOAT
{ 2, 1, 1, 4, false, true, true , false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DEPTH24_UNORM_STENCIL8
{ 2, 1, 1, 5, false, true, true , false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_DEPTH32_FLOAT_STENCIL8
{ 1, 1, 1, 1, false, false, true , false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_STENCIL8
{ 1, 1, 1, 2, false, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DEPTH16_UNORM
{ 1, 1, 1, 3, false, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DEPTH24_UNORM
{ 1, 1, 1, 4, false, true, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_DEPTH32_FLOAT
{ 2, 1, 1, 4, false, true, true , false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DEPTH24_UNORM_STENCIL8
{ 2, 1, 1, 5, false, true, true , false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_DEPTH32_FLOAT_STENCIL8
{ 3, 4, 4, 8, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT1_UNORM
{ 4, 4, 4, 16, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT3_UNORM
{ 4, 4, 4, 16, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT5_UNORM
{ 1, 4, 4, 8, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BC4_UNORM
{ 1, 4, 4, 8, true, false, false, true, PIXELFORMATTYPE_SNORM }, // PIXELFORMAT_BC4_SNORM
{ 2, 4, 4, 16, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BC5_UNORM
{ 2, 4, 4, 16, true, false, false, true, PIXELFORMATTYPE_SNORM }, // PIXELFORMAT_BC5_SNORM
{ 3, 4, 4, 16, true, false, false, true, PIXELFORMATTYPE_UFLOAT }, // PIXELFORMAT_BC6H_UFLOAT
{ 3, 4, 4, 16, true, false, false, true, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_BC6H_FLOAT
{ 4, 4, 4, 16, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BC7_UNORM
{ 3, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT1_UNORM
{ 3, 4, 4, 8, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT1_sRGB
{ 4, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT3_UNORM
{ 4, 4, 4, 16, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT3_sRGB
{ 4, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT5_UNORM
{ 4, 4, 4, 16, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT5_sRGB
{ 1, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BC4_UNORM
{ 1, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_SNORM }, // PIXELFORMAT_BC4_SNORM
{ 2, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BC5_UNORM
{ 2, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_SNORM }, // PIXELFORMAT_BC5_SNORM
{ 3, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UFLOAT }, // PIXELFORMAT_BC6H_UFLOAT
{ 3, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_BC6H_FLOAT
{ 4, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BC7_UNORM
{ 4, 4, 4, 16, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BC7_sRGB
{ 3, 16, 8, 32, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGB2_UNORM
{ 3, 8, 8, 32, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGB4_UNORM
{ 4, 16, 8, 32, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGBA2_UNORM
{ 4, 8, 8, 32, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGBA4_UNORM
{ 3, 16, 8, 32, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGB2_UNORM
{ 3, 16, 8, 32, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGB2_sRGB
{ 3, 8, 8, 32, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGB4_UNORM
{ 3, 8, 8, 32, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGB4_sRGB
{ 4, 16, 8, 32, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGBA2_UNORM
{ 4, 16, 8, 32, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGBA2_sRGB
{ 4, 8, 8, 32, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGBA4_UNORM
{ 4, 8, 8, 32, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGBA4_sRGB
{ 3, 4, 4, 8, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC1_UNORM
{ 3, 4, 4, 8, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGB_UNORM
{ 4, 4, 4, 16, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGBA_UNORM
{ 4, 4, 4, 8, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGBA1_UNORM
{ 1, 4, 4, 8, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_EAC_R_UNORM
{ 1, 4, 4, 8, true, false, false, true, PIXELFORMATTYPE_SNORM }, // PIXELFORMAT_EAC_R_SNORM
{ 2, 4, 4, 16, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_EAC_RG_UNORM
{ 2, 4, 4, 16, true, false, false, true, PIXELFORMATTYPE_SNORM }, // PIXELFORMAT_EAC_RG_SNORM
{ 3, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC1_UNORM
{ 3, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGB_UNORM
{ 3, 4, 4, 8, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGB_sRGB
{ 4, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGBA_UNORM
{ 4, 4, 4, 16, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGBA_sRGB
{ 4, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGBA1_UNORM
{ 4, 4, 4, 8, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGBA1_sRGB
{ 1, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_EAC_R_UNORM
{ 1, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_SNORM }, // PIXELFORMAT_EAC_R_SNORM
{ 2, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_EAC_RG_UNORM
{ 2, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_SNORM }, // PIXELFORMAT_EAC_RG_SNORM
{ 4, 4, 4, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_4x4
{ 4, 5, 4, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_5x4
{ 4, 5, 5, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_5x5
{ 4, 6, 5, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_6x5
{ 4, 6, 6, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_6x6
{ 4, 8, 5, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x5
{ 4, 8, 6, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x6
{ 4, 8, 8, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x8
{ 4, 8, 5, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x5
{ 4, 10, 6, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x6
{ 4, 10, 8, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x8
{ 4, 10, 10, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x10
{ 4, 12, 10, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_12x10
{ 4, 12, 12, 1, true, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_12x12
{ 4, 4, 4, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_4x4_UNORM
{ 4, 5, 4, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_5x4_UNORM
{ 4, 5, 5, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_5x5_UNORM
{ 4, 6, 5, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_6x5_UNORM
{ 4, 6, 6, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_6x6_UNORM
{ 4, 8, 5, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x5_UNORM
{ 4, 8, 6, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x6_UNORM
{ 4, 8, 8, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x8_UNORM
{ 4, 8, 5, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x5_UNORM
{ 4, 10, 6, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x6_UNORM
{ 4, 10, 8, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x8_UNORM
{ 4, 10, 10, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x10_UNORM
{ 4, 12, 10, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_12x10_UNORM
{ 4, 12, 12, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_12x12_UNORM
{ 4, 4, 4, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_4x4_sRGB
{ 4, 5, 4, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_5x4_sRGB
{ 4, 5, 5, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_5x5_sRGB
{ 4, 6, 5, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_6x5_sRGB
{ 4, 6, 6, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_6x6_sRGB
{ 4, 8, 5, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x5_sRGB
{ 4, 8, 6, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x6_sRGB
{ 4, 8, 8, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x8_sRGB
{ 4, 8, 5, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x5_sRGB
{ 4, 10, 6, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x6_sRGB
{ 4, 10, 8, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x8_sRGB
{ 4, 10, 10, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x10_sRGB
{ 4, 12, 10, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_12x10_sRGB
{ 4, 12, 12, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_12x12_sRGB
};
static_assert(sizeof(formatInfo) / sizeof(PixelFormatInfo) == PIXELFORMAT_MAX_ENUM, "Update the formatInfo array when adding or removing a PixelFormat");
@@ -156,9 +181,9 @@ static StringMap<PixelFormat, PIXELFORMAT_MAX_ENUM>::Entry formatEntries[] =
{ "rg32ui", PIXELFORMAT_RG32_UINT },
{ "rgba8", PIXELFORMAT_RGBA8_UNORM },
{ "srgba8", PIXELFORMAT_RGBA8_UNORM_sRGB },
{ "srgba8", PIXELFORMAT_RGBA8_sRGB },
{ "bgra8", PIXELFORMAT_BGRA8_UNORM },
{ "bgra8srgb", PIXELFORMAT_BGRA8_UNORM_sRGB },
{ "bgra8srgb", PIXELFORMAT_BGRA8_sRGB },
{ "rgba8i", PIXELFORMAT_RGBA8_INT },
{ "rgba8ui", PIXELFORMAT_RGBA8_UINT },
{ "rgba16", PIXELFORMAT_RGBA16_UNORM },
@@ -183,8 +208,11 @@ static StringMap<PixelFormat, PIXELFORMAT_MAX_ENUM>::Entry formatEntries[] =
{ "depth32fstencil8", PIXELFORMAT_DEPTH32_FLOAT_STENCIL8 },
{ "DXT1", PIXELFORMAT_DXT1_UNORM },
{ "DXT1srgb", PIXELFORMAT_DXT1_sRGB },
{ "DXT3", PIXELFORMAT_DXT3_UNORM },
{ "DXT3srgb", PIXELFORMAT_DXT3_sRGB },
{ "DXT5", PIXELFORMAT_DXT5_UNORM },
{ "DXT5srgb", PIXELFORMAT_DXT5_sRGB },
{ "BC4", PIXELFORMAT_BC4_UNORM },
{ "BC4s", PIXELFORMAT_BC4_SNORM },
{ "BC5", PIXELFORMAT_BC5_UNORM },
@@ -192,33 +220,57 @@ static StringMap<PixelFormat, PIXELFORMAT_MAX_ENUM>::Entry formatEntries[] =
{ "BC6h", PIXELFORMAT_BC6H_UFLOAT },
{ "BC6hs", PIXELFORMAT_BC6H_FLOAT },
{ "BC7", PIXELFORMAT_BC7_UNORM },
{ "BC7srgb", PIXELFORMAT_BC7_sRGB },
{ "PVR1rgb2", PIXELFORMAT_PVR1_RGB2_UNORM },
{ "PVR1rgb2srgb", PIXELFORMAT_PVR1_RGB2_sRGB },
{ "PVR1rgb4", PIXELFORMAT_PVR1_RGB4_UNORM },
{ "PVR1rgb4srgb", PIXELFORMAT_PVR1_RGB4_sRGB },
{ "PVR1rgba2", PIXELFORMAT_PVR1_RGBA2_UNORM },
{ "PVR1rgba2srgb", PIXELFORMAT_PVR1_RGBA2_sRGB },
{ "PVR1rgba4", PIXELFORMAT_PVR1_RGBA4_UNORM },
{ "PVR1rgba4srgb", PIXELFORMAT_PVR1_RGBA4_sRGB },
{ "ETC1", PIXELFORMAT_ETC1_UNORM },
{ "ETC2rgb", PIXELFORMAT_ETC2_RGB_UNORM },
{ "ETC2srgb", PIXELFORMAT_ETC2_RGB_sRGB },
{ "ETC2rgba", PIXELFORMAT_ETC2_RGBA_UNORM },
{ "ETC2srgba", PIXELFORMAT_ETC2_RGBA_sRGB },
{ "ETC2rgba1", PIXELFORMAT_ETC2_RGBA1_UNORM },
{ "ETC2srgba1", PIXELFORMAT_ETC2_RGBA1_sRGB },
{ "EACr", PIXELFORMAT_EAC_R_UNORM },
{ "EACrs", PIXELFORMAT_EAC_R_SNORM },
{ "EACrg", PIXELFORMAT_EAC_RG_UNORM },
{ "EACrgs", PIXELFORMAT_EAC_RG_SNORM },
{ "ASTC4x4", PIXELFORMAT_ASTC_4x4 },
{ "ASTC5x4", PIXELFORMAT_ASTC_5x4 },
{ "ASTC5x5", PIXELFORMAT_ASTC_5x5 },
{ "ASTC6x5", PIXELFORMAT_ASTC_6x5 },
{ "ASTC6x6", PIXELFORMAT_ASTC_6x6 },
{ "ASTC8x5", PIXELFORMAT_ASTC_8x5 },
{ "ASTC8x6", PIXELFORMAT_ASTC_8x6 },
{ "ASTC8x8", PIXELFORMAT_ASTC_8x8 },
{ "ASTC10x5", PIXELFORMAT_ASTC_10x5 },
{ "ASTC10x6", PIXELFORMAT_ASTC_10x6 },
{ "ASTC10x8", PIXELFORMAT_ASTC_10x8 },
{ "ASTC10x10", PIXELFORMAT_ASTC_10x10 },
{ "ASTC12x10", PIXELFORMAT_ASTC_12x10 },
{ "ASTC12x12", PIXELFORMAT_ASTC_12x12 },
{ "ASTC4x4", PIXELFORMAT_ASTC_4x4_UNORM },
{ "ASTC5x4", PIXELFORMAT_ASTC_5x4_UNORM },
{ "ASTC5x5", PIXELFORMAT_ASTC_5x5_UNORM },
{ "ASTC6x5", PIXELFORMAT_ASTC_6x5_UNORM },
{ "ASTC6x6", PIXELFORMAT_ASTC_6x6_UNORM },
{ "ASTC8x5", PIXELFORMAT_ASTC_8x5_UNORM },
{ "ASTC8x6", PIXELFORMAT_ASTC_8x6_UNORM },
{ "ASTC8x8", PIXELFORMAT_ASTC_8x8_UNORM },
{ "ASTC10x5", PIXELFORMAT_ASTC_10x5_UNORM },
{ "ASTC10x6", PIXELFORMAT_ASTC_10x6_UNORM },
{ "ASTC10x8", PIXELFORMAT_ASTC_10x8_UNORM },
{ "ASTC10x10", PIXELFORMAT_ASTC_10x10_UNORM },
{ "ASTC12x10", PIXELFORMAT_ASTC_12x10_UNORM },
{ "ASTC12x12", PIXELFORMAT_ASTC_12x12_UNORM },
{ "ASTC4x4srgb", PIXELFORMAT_ASTC_4x4_sRGB },
{ "ASTC5x4srgb", PIXELFORMAT_ASTC_5x4_sRGB },
{ "ASTC5x5srgb", PIXELFORMAT_ASTC_5x5_sRGB },
{ "ASTC6x5srgb", PIXELFORMAT_ASTC_6x5_sRGB },
{ "ASTC6x6srgb", PIXELFORMAT_ASTC_6x6_sRGB },
{ "ASTC8x5srgb", PIXELFORMAT_ASTC_8x5_sRGB },
{ "ASTC8x6srgb", PIXELFORMAT_ASTC_8x6_sRGB },
{ "ASTC8x8srgb", PIXELFORMAT_ASTC_8x8_sRGB },
{ "ASTC10x5srgb", PIXELFORMAT_ASTC_10x5_sRGB },
{ "ASTC10x6srgb", PIXELFORMAT_ASTC_10x6_sRGB },
{ "ASTC10x8srgb", PIXELFORMAT_ASTC_10x8_sRGB },
{ "ASTC10x10srgb", PIXELFORMAT_ASTC_10x10_sRGB },
{ "ASTC12x10srgb", PIXELFORMAT_ASTC_12x10_sRGB },
{ "ASTC12x12srgb", PIXELFORMAT_ASTC_12x12_sRGB },
};
static_assert(sizeof(formatEntries) / sizeof(formatEntries[0]) == (size_t) PIXELFORMAT_MAX_ENUM, "pixel format string map is missing entries!");
@@ -275,7 +327,7 @@ bool isPixelFormatStencil(PixelFormat format)
bool isPixelFormatSRGB(PixelFormat format)
{
return format == PIXELFORMAT_RGBA8_UNORM_sRGB || format == PIXELFORMAT_BGRA8_UNORM_sRGB;
return formatInfo[format].sRGB;
}
bool isPixelFormatInteger(PixelFormat format)
@@ -286,20 +338,73 @@ bool isPixelFormatInteger(PixelFormat format)
PixelFormat getSRGBPixelFormat(PixelFormat format)
{
if (format == PIXELFORMAT_RGBA8_UNORM)
return PIXELFORMAT_RGBA8_UNORM_sRGB;
else if (format == PIXELFORMAT_BGRA8_UNORM)
return PIXELFORMAT_BGRA8_UNORM_sRGB;
return format;
switch (format)
{
case PIXELFORMAT_RGBA8_UNORM: return PIXELFORMAT_RGBA8_sRGB;
case PIXELFORMAT_BGRA8_UNORM: return PIXELFORMAT_BGRA8_sRGB;
case PIXELFORMAT_DXT1_UNORM: return PIXELFORMAT_DXT1_sRGB;
case PIXELFORMAT_DXT3_UNORM: return PIXELFORMAT_DXT3_sRGB;
case PIXELFORMAT_DXT5_UNORM: return PIXELFORMAT_DXT5_sRGB;
case PIXELFORMAT_BC7_UNORM: return PIXELFORMAT_BC7_sRGB;
case PIXELFORMAT_PVR1_RGB2_UNORM: return PIXELFORMAT_PVR1_RGB2_sRGB;
case PIXELFORMAT_PVR1_RGB4_UNORM: return PIXELFORMAT_PVR1_RGB4_sRGB;
case PIXELFORMAT_PVR1_RGBA2_UNORM: return PIXELFORMAT_PVR1_RGBA2_sRGB;
case PIXELFORMAT_PVR1_RGBA4_UNORM: return PIXELFORMAT_PVR1_RGBA4_sRGB;
case PIXELFORMAT_ETC1_UNORM: return PIXELFORMAT_ETC2_RGB_sRGB; // ETC2 can load ETC1 data.
case PIXELFORMAT_ETC2_RGB_UNORM: return PIXELFORMAT_ETC2_RGB_sRGB;
case PIXELFORMAT_ETC2_RGBA_UNORM: return PIXELFORMAT_ETC2_RGBA_sRGB;
case PIXELFORMAT_ETC2_RGBA1_UNORM: return PIXELFORMAT_ETC2_RGBA1_sRGB;
case PIXELFORMAT_ASTC_4x4_UNORM: return PIXELFORMAT_ASTC_4x4_sRGB;
case PIXELFORMAT_ASTC_5x4_UNORM: return PIXELFORMAT_ASTC_5x4_sRGB;
case PIXELFORMAT_ASTC_5x5_UNORM: return PIXELFORMAT_ASTC_5x5_sRGB;
case PIXELFORMAT_ASTC_6x5_UNORM: return PIXELFORMAT_ASTC_6x5_sRGB;
case PIXELFORMAT_ASTC_6x6_UNORM: return PIXELFORMAT_ASTC_6x6_sRGB;
case PIXELFORMAT_ASTC_8x5_UNORM: return PIXELFORMAT_ASTC_8x5_sRGB;
case PIXELFORMAT_ASTC_8x6_UNORM: return PIXELFORMAT_ASTC_8x6_sRGB;
case PIXELFORMAT_ASTC_8x8_UNORM: return PIXELFORMAT_ASTC_8x8_sRGB;
case PIXELFORMAT_ASTC_10x5_UNORM: return PIXELFORMAT_ASTC_10x5_sRGB;
case PIXELFORMAT_ASTC_10x6_UNORM: return PIXELFORMAT_ASTC_10x6_sRGB;
case PIXELFORMAT_ASTC_10x8_UNORM: return PIXELFORMAT_ASTC_10x8_sRGB;
case PIXELFORMAT_ASTC_10x10_UNORM: return PIXELFORMAT_ASTC_10x10_sRGB;
case PIXELFORMAT_ASTC_12x10_UNORM: return PIXELFORMAT_ASTC_12x10_sRGB;
case PIXELFORMAT_ASTC_12x12_UNORM: return PIXELFORMAT_ASTC_12x12_sRGB;
default: return format;
}
}
PixelFormat getLinearPixelFormat(PixelFormat format)
{
if (format == PIXELFORMAT_RGBA8_UNORM_sRGB)
return PIXELFORMAT_RGBA8_UNORM;
else if (format == PIXELFORMAT_BGRA8_UNORM_sRGB)
return PIXELFORMAT_BGRA8_UNORM;
return format;
switch (format)
{
case PIXELFORMAT_RGBA8_sRGB: return PIXELFORMAT_RGBA8_UNORM;
case PIXELFORMAT_BGRA8_sRGB: return PIXELFORMAT_BGRA8_UNORM;
case PIXELFORMAT_DXT1_sRGB: return PIXELFORMAT_DXT1_UNORM;
case PIXELFORMAT_DXT3_sRGB: return PIXELFORMAT_DXT3_UNORM;
case PIXELFORMAT_DXT5_sRGB: return PIXELFORMAT_DXT5_UNORM;
case PIXELFORMAT_BC7_sRGB: return PIXELFORMAT_BC7_UNORM;
case PIXELFORMAT_PVR1_RGB2_sRGB: return PIXELFORMAT_PVR1_RGB2_UNORM;
case PIXELFORMAT_PVR1_RGB4_sRGB: return PIXELFORMAT_PVR1_RGB4_UNORM;
case PIXELFORMAT_PVR1_RGBA2_sRGB: return PIXELFORMAT_PVR1_RGBA2_UNORM;
case PIXELFORMAT_PVR1_RGBA4_sRGB: return PIXELFORMAT_PVR1_RGBA4_UNORM;
case PIXELFORMAT_ETC2_RGB_sRGB: return PIXELFORMAT_ETC2_RGB_UNORM;
case PIXELFORMAT_ETC2_RGBA_sRGB: return PIXELFORMAT_ETC2_RGBA_UNORM;
case PIXELFORMAT_ETC2_RGBA1_sRGB: return PIXELFORMAT_ETC2_RGBA1_UNORM;
case PIXELFORMAT_ASTC_4x4_sRGB: return PIXELFORMAT_ASTC_4x4_UNORM;
case PIXELFORMAT_ASTC_5x4_sRGB: return PIXELFORMAT_ASTC_5x4_UNORM;
case PIXELFORMAT_ASTC_5x5_sRGB: return PIXELFORMAT_ASTC_5x5_UNORM;
case PIXELFORMAT_ASTC_6x5_sRGB: return PIXELFORMAT_ASTC_6x5_UNORM;
case PIXELFORMAT_ASTC_6x6_sRGB: return PIXELFORMAT_ASTC_6x6_UNORM;
case PIXELFORMAT_ASTC_8x5_sRGB: return PIXELFORMAT_ASTC_8x5_UNORM;
case PIXELFORMAT_ASTC_8x6_sRGB: return PIXELFORMAT_ASTC_8x6_UNORM;
case PIXELFORMAT_ASTC_8x8_sRGB: return PIXELFORMAT_ASTC_8x8_UNORM;
case PIXELFORMAT_ASTC_10x5_sRGB: return PIXELFORMAT_ASTC_10x5_UNORM;
case PIXELFORMAT_ASTC_10x6_sRGB: return PIXELFORMAT_ASTC_10x6_UNORM;
case PIXELFORMAT_ASTC_10x8_sRGB: return PIXELFORMAT_ASTC_10x8_UNORM;
case PIXELFORMAT_ASTC_10x10_sRGB: return PIXELFORMAT_ASTC_10x10_UNORM;
case PIXELFORMAT_ASTC_12x10_sRGB: return PIXELFORMAT_ASTC_12x10_UNORM;
case PIXELFORMAT_ASTC_12x12_sRGB: return PIXELFORMAT_ASTC_12x12_UNORM;
default: return format;
}
}
size_t getPixelFormatBlockSize(PixelFormat format)
+46 -17
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -60,9 +60,9 @@ enum PixelFormat
// 4-channel normal formats
PIXELFORMAT_RGBA8_UNORM,
PIXELFORMAT_RGBA8_UNORM_sRGB,
PIXELFORMAT_RGBA8_sRGB,
PIXELFORMAT_BGRA8_UNORM,
PIXELFORMAT_BGRA8_UNORM_sRGB,
PIXELFORMAT_BGRA8_sRGB,
PIXELFORMAT_RGBA8_INT,
PIXELFORMAT_RGBA8_UINT,
PIXELFORMAT_RGBA16_UNORM,
@@ -90,8 +90,11 @@ enum PixelFormat
// compressed formats
PIXELFORMAT_DXT1_UNORM,
PIXELFORMAT_DXT1_sRGB,
PIXELFORMAT_DXT3_UNORM,
PIXELFORMAT_DXT3_sRGB,
PIXELFORMAT_DXT5_UNORM,
PIXELFORMAT_DXT5_sRGB,
PIXELFORMAT_BC4_UNORM,
PIXELFORMAT_BC4_SNORM,
PIXELFORMAT_BC5_UNORM,
@@ -99,32 +102,57 @@ enum PixelFormat
PIXELFORMAT_BC6H_UFLOAT,
PIXELFORMAT_BC6H_FLOAT,
PIXELFORMAT_BC7_UNORM,
PIXELFORMAT_BC7_sRGB,
PIXELFORMAT_PVR1_RGB2_UNORM,
PIXELFORMAT_PVR1_RGB2_sRGB,
PIXELFORMAT_PVR1_RGB4_UNORM,
PIXELFORMAT_PVR1_RGB4_sRGB,
PIXELFORMAT_PVR1_RGBA2_UNORM,
PIXELFORMAT_PVR1_RGBA2_sRGB,
PIXELFORMAT_PVR1_RGBA4_UNORM,
PIXELFORMAT_PVR1_RGBA4_sRGB,
PIXELFORMAT_ETC1_UNORM,
PIXELFORMAT_ETC2_RGB_UNORM,
PIXELFORMAT_ETC2_RGB_sRGB,
PIXELFORMAT_ETC2_RGBA_UNORM,
PIXELFORMAT_ETC2_RGBA_sRGB,
PIXELFORMAT_ETC2_RGBA1_UNORM,
PIXELFORMAT_ETC2_RGBA1_sRGB,
PIXELFORMAT_EAC_R_UNORM,
PIXELFORMAT_EAC_R_SNORM,
PIXELFORMAT_EAC_RG_UNORM,
PIXELFORMAT_EAC_RG_SNORM,
PIXELFORMAT_ASTC_4x4,
PIXELFORMAT_ASTC_5x4,
PIXELFORMAT_ASTC_5x5,
PIXELFORMAT_ASTC_6x5,
PIXELFORMAT_ASTC_6x6,
PIXELFORMAT_ASTC_8x5,
PIXELFORMAT_ASTC_8x6,
PIXELFORMAT_ASTC_8x8,
PIXELFORMAT_ASTC_10x5,
PIXELFORMAT_ASTC_10x6,
PIXELFORMAT_ASTC_10x8,
PIXELFORMAT_ASTC_10x10,
PIXELFORMAT_ASTC_12x10,
PIXELFORMAT_ASTC_12x12,
PIXELFORMAT_ASTC_4x4_UNORM,
PIXELFORMAT_ASTC_5x4_UNORM,
PIXELFORMAT_ASTC_5x5_UNORM,
PIXELFORMAT_ASTC_6x5_UNORM,
PIXELFORMAT_ASTC_6x6_UNORM,
PIXELFORMAT_ASTC_8x5_UNORM,
PIXELFORMAT_ASTC_8x6_UNORM,
PIXELFORMAT_ASTC_8x8_UNORM,
PIXELFORMAT_ASTC_10x5_UNORM,
PIXELFORMAT_ASTC_10x6_UNORM,
PIXELFORMAT_ASTC_10x8_UNORM,
PIXELFORMAT_ASTC_10x10_UNORM,
PIXELFORMAT_ASTC_12x10_UNORM,
PIXELFORMAT_ASTC_12x12_UNORM,
PIXELFORMAT_ASTC_4x4_sRGB,
PIXELFORMAT_ASTC_5x4_sRGB,
PIXELFORMAT_ASTC_5x5_sRGB,
PIXELFORMAT_ASTC_6x5_sRGB,
PIXELFORMAT_ASTC_6x6_sRGB,
PIXELFORMAT_ASTC_8x5_sRGB,
PIXELFORMAT_ASTC_8x6_sRGB,
PIXELFORMAT_ASTC_8x8_sRGB,
PIXELFORMAT_ASTC_10x5_sRGB,
PIXELFORMAT_ASTC_10x6_sRGB,
PIXELFORMAT_ASTC_10x8_sRGB,
PIXELFORMAT_ASTC_10x10_sRGB,
PIXELFORMAT_ASTC_12x10_sRGB,
PIXELFORMAT_ASTC_12x12_sRGB,
PIXELFORMAT_MAX_ENUM
};
@@ -149,6 +177,7 @@ struct PixelFormatInfo
bool depth;
bool stencil;
bool compressed;
bool sRGB;
PixelFormatType dataType;
};
+5 -4
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -473,9 +473,6 @@ int luax_register_module(lua_State *L, const WrappedModule &m)
lua_setfield(L, -3, m.name); // love.graphics = table
lua_remove(L, -2); // love
// Register module instance
Module::registerInstance(m.module);
return 1;
}
@@ -550,6 +547,10 @@ int luax_register_type(lua_State *L, love::Type *type, ...)
lua_pushcfunction(L, w__release);
lua_setfield(L, -2, "release");
// Add __close for lua 5.4 (just calls release)
lua_pushcfunction(L, w__release);
lua_setfield(L, -2, "__close");
va_list fs;
va_start(fs, type);
for (const luaL_Reg *f = va_arg(fs, const luaL_Reg *); f; f = va_arg(fs, const luaL_Reg *))
+15 -8
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -629,22 +629,29 @@ T *luax_optmodule(lua_State *L)
}
/**
* Converts the value at idx to the specified type without checking that
* this conversion is valid. If the type has been previously verified with
* luax_istype, then this can be safely used. Otherwise, use luax_checktype.
* Converts the value at idx to the specified type. Returns null if the type
* doesn't match.
* @param L The Lua state.
* @param idx The index on the stack.
* @param type The type of the object.
**/
template <typename T>
T *luax_totype(lua_State *L, int idx, const love::Type& /*type*/)
T *luax_totype(lua_State *L, int idx, const love::Type &type)
{
T *o = (T *)(((Proxy *)lua_touserdata(L, idx))->object);
if (lua_type(L, idx) != LUA_TUSERDATA)
return nullptr;
if (o == nullptr)
Proxy *p = (Proxy *) lua_touserdata(L, idx);
if (p->type != nullptr && p->type->isa(type))
{
if (p->object == nullptr)
luaL_error(L, "Cannot use object after it has been released.");
return o;
return (T *) p->object;
}
return nullptr;
}
template <typename T>
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,7 +1,7 @@
/**
* Simple DDS data parser for compressed 2D textures.
*
* Copyright (c) 2013-2023 Sasha Szpakowski
* Copyright (c) 2013-2024 Sasha Szpakowski
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,7 +1,7 @@
/**
* Simple DDS data parser for compressed 2D textures.
*
* Copyright (c) 2013-2023 Sasha Szpakowski
* Copyright (c) 2013-2024 Sasha Szpakowski
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,7 +1,7 @@
/**
* Simple DDS data parser for compressed 2D textures.
*
* Copyright (c) 2013-2023 Sasha Szpakowski
* Copyright (c) 2013-2024 Sasha Szpakowski
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2023 LOVE Development Team
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -1,165 +0,0 @@
//
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
//
// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
#define SH_EXPORTING
#include <cassert>
#include "InitializeDll.h"
#include "../glslang/Include/InitializeGlobals.h"
#include "../glslang/Public/ShaderLang.h"
#include "../glslang/Include/PoolAlloc.h"
namespace glslang {
OS_TLSIndex ThreadInitializeIndex = OS_INVALID_TLS_INDEX;
// Per-process initialization.
// Needs to be called at least once before parsing, etc. is done.
// Will also do thread initialization for the calling thread; other
// threads will need to do that explicitly.
bool InitProcess()
{
glslang::GetGlobalLock();
if (ThreadInitializeIndex != OS_INVALID_TLS_INDEX) {
//
// Function is re-entrant.
//
glslang::ReleaseGlobalLock();
return true;
}
ThreadInitializeIndex = OS_AllocTLSIndex();
if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) {
assert(0 && "InitProcess(): Failed to allocate TLS area for init flag");
glslang::ReleaseGlobalLock();
return false;
}
if (! InitializePoolIndex()) {
assert(0 && "InitProcess(): Failed to initialize global pool");
glslang::ReleaseGlobalLock();
return false;
}
if (! InitThread()) {
assert(0 && "InitProcess(): Failed to initialize thread");
glslang::ReleaseGlobalLock();
return false;
}
glslang::ReleaseGlobalLock();
return true;
}
// Per-thread scoped initialization.
// Must be called at least once by each new thread sharing the
// symbol tables, etc., needed to parse.
bool InitThread()
{
//
// This function is re-entrant
//
if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) {
assert(0 && "InitThread(): Process hasn't been initalised.");
return false;
}
if (OS_GetTLSValue(ThreadInitializeIndex) != 0)
return true;
if (! OS_SetTLSValue(ThreadInitializeIndex, (void *)1)) {
assert(0 && "InitThread(): Unable to set init flag.");
return false;
}
glslang::SetThreadPoolAllocator(nullptr);
return true;
}
// Not necessary to call this: InitThread() is reentrant, and the need
// to do per thread tear down has been removed.
//
// This is kept, with memory management removed, to satisfy any exiting
// calls to it that rely on it.
bool DetachThread()
{
bool success = true;
if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX)
return true;
//
// Function is re-entrant and this thread may not have been initialized.
//
if (OS_GetTLSValue(ThreadInitializeIndex) != 0) {
if (!OS_SetTLSValue(ThreadInitializeIndex, (void *)0)) {
assert(0 && "DetachThread(): Unable to clear init flag.");
success = false;
}
}
return success;
}
// Not necessary to call this: InitProcess() is reentrant.
//
// This is kept, with memory management removed, to satisfy any exiting
// calls to it that rely on it.
//
// Users of glslang should call shFinalize() or glslang::FinalizeProcess() for
// process-scoped memory tear down.
bool DetachProcess()
{
bool success = true;
if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX)
return true;
success = DetachThread();
OS_FreeTLSIndex(ThreadInitializeIndex);
ThreadInitializeIndex = OS_INVALID_TLS_INDEX;
return success;
}
} // end namespace glslang
@@ -0,0 +1,35 @@
/*
** Copyright (c) 2022 ARM Limited
**
** Permission is hereby granted, free of charge, to any person obtaining a copy
** of this software and/or associated documentation files (the "Materials"),
** to deal in the Materials without restriction, including without limitation
** the rights to use, copy, modify, merge, publish, distribute, sublicense,
** and/or sell copies of the Materials, and to permit persons to whom the
** Materials are furnished to do so, subject to the following conditions:
**
** The above copyright notice and this permission notice shall be included in
** all copies or substantial portions of the Materials.
**
** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
** IN THE MATERIALS.
*/
#ifndef GLSLextARM_H
#define GLSLextARM_H
static const int GLSLextARMVersion = 100;
static const int GLSLextARMRevision = 1;
static const char * const E_SPV_ARM_core_builtins = "SPV_ARM_core_builtins";
#endif // #ifndef GLSLextARM_H
@@ -39,5 +39,7 @@ static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_ato
static const char* const E_SPV_EXT_shader_atomic_float16_add = "SPV_EXT_shader_atomic_float16_add";
static const char* const E_SPV_EXT_shader_atomic_float_min_max = "SPV_EXT_shader_atomic_float_min_max";
static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64";
static const char* const E_SPV_EXT_shader_tile_image = "SPV_EXT_shader_tile_image";
static const char* const E_SPV_EXT_mesh_shader = "SPV_EXT_mesh_shader";
#endif // #ifndef GLSLextEXT_H
+10 -1
View File
@@ -1,5 +1,6 @@
/*
** Copyright (c) 2014-2020 The Khronos Group Inc.
** Copyright (C) 2022-2024 Arm Limited.
** Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
**
** Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -29,7 +30,7 @@
#define GLSLextKHR_H
static const int GLSLextKHRVersion = 100;
static const int GLSLextKHRRevision = 2;
static const int GLSLextKHRRevision = 3;
static const char* const E_SPV_KHR_shader_ballot = "SPV_KHR_shader_ballot";
static const char* const E_SPV_KHR_subgroup_vote = "SPV_KHR_subgroup_vote";
@@ -52,5 +53,13 @@ static const char* const E_SPV_KHR_fragment_shading_rate = "SPV_KHR_fragm
static const char* const E_SPV_KHR_terminate_invocation = "SPV_KHR_terminate_invocation";
static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_workgroup_memory_explicit_layout";
static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subgroup_uniform_control_flow";
static const char* const E_SPV_KHR_fragment_shader_barycentric = "SPV_KHR_fragment_shader_barycentric";
static const char* const E_SPV_KHR_quad_control = "SPV_KHR_quad_control";
static const char* const E_SPV_AMD_shader_early_and_late_fragment_tests = "SPV_AMD_shader_early_and_late_fragment_tests";
static const char* const E_SPV_KHR_ray_tracing_position_fetch = "SPV_KHR_ray_tracing_position_fetch";
static const char* const E_SPV_KHR_cooperative_matrix = "SPV_KHR_cooperative_matrix";
static const char* const E_SPV_KHR_maximal_reconvergence = "SPV_KHR_maximal_reconvergence";
static const char* const E_SPV_KHR_subgroup_rotate = "SPV_KHR_subgroup_rotate";
static const char* const E_SPV_KHR_expect_assume = "SPV_KHR_expect_assume";
#endif // #ifndef GLSLextKHR_H
@@ -81,4 +81,13 @@ const char* const E_SPV_NV_cooperative_matrix = "SPV_NV_cooperative_matrix";
//SPV_NV_shader_sm_builtins
const char* const E_SPV_NV_shader_sm_builtins = "SPV_NV_shader_sm_builtins";
//SPV_NV_shader_execution_reorder
const char* const E_SPV_NV_shader_invocation_reorder = "SPV_NV_shader_invocation_reorder";
//SPV_NV_displacement_micromap
const char* const E_SPV_NV_displacement_micromap = "SPV_NV_displacement_micromap";
//SPV_NV_shader_atomic_fp16_vector
const char* const E_SPV_NV_shader_atomic_fp16_vector = "SPV_NV_shader_atomic_fp16_vector";
#endif // #ifndef GLSLextNV_H
@@ -0,0 +1,43 @@
/*
** Copyright (c) 2021 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a copy
** of this software and/or associated documentation files (the "Materials"),
** to deal in the Materials without restriction, including without limitation
** the rights to use, copy, modify, merge, publish, distribute, sublicense,
** and/or sell copies of the Materials, and to permit persons to whom the
** Materials are furnished to do so, subject to the following conditions:
**
** The above copyright notice and this permission notice shall be included in
** all copies or substantial portions of the Materials.
**
** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
** IN THE MATERIALS.
*/
#ifndef GLSLextQCOM_H
#define GLSLextQCOM_H
enum BuiltIn;
enum Decoration;
enum Op;
enum Capability;
static const int GLSLextQCOMVersion = 100;
static const int GLSLextQCOMRevision = 1;
//SPV_QCOM_image_processing
const char* const E_SPV_QCOM_image_processing = "SPV_QCOM_image_processing";
//SPV_QCOM_image_processing2
const char* const E_SPV_QCOM_image_processing2 = "SPV_QCOM_image_processing2";
#endif // #ifndef GLSLextQCOM_H
+1322 -407
View File
File diff suppressed because it is too large Load Diff
+15 -9
View File
@@ -35,19 +35,25 @@
#pragma once
#if defined(_MSC_VER) && _MSC_VER >= 1900
#pragma warning(disable : 4464) // relative include path contains '..'
#endif
#include "SpvTools.h"
#include "../glslang/Include/intermediate.h"
#include <string>
#include <vector>
#include "Logger.h"
namespace glslang {
class TIntermediate;
struct SpvOptions {
bool generateDebugInfo {false};
bool stripDebugInfo {false};
bool disableOptimizer {true};
bool optimizeSize {false};
bool disassemble {false};
bool validate {false};
bool emitNonSemanticShaderDebugInfo {false};
bool emitNonSemanticShaderDebugSource{ false };
bool compileOnly{false};
};
void GetSpirvVersion(std::string&);
int GetSpirvGeneratorVersion();
@@ -55,7 +61,7 @@ void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsign
SpvOptions* options = nullptr);
void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
spv::SpvBuildLogger* logger, SpvOptions* options = nullptr);
void OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName);
void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName);
bool OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName);
bool OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName);
}
-4
View File
@@ -32,8 +32,6 @@
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#ifndef GLSLANG_WEB
#include "Logger.h"
#include <algorithm>
@@ -68,5 +66,3 @@ std::string SpvBuildLogger::getAllMessages() const {
}
} // end spv namespace
#endif
-9
View File
@@ -46,14 +46,6 @@ class SpvBuildLogger {
public:
SpvBuildLogger() {}
#ifdef GLSLANG_WEB
void tbdFunctionality(const std::string& f) { }
void missingFunctionality(const std::string& f) { }
void warning(const std::string& w) { }
void error(const std::string& e) { errors.push_back(e); }
std::string getAllMessages() { return ""; }
#else
// Registers a TBD functionality.
void tbdFunctionality(const std::string& f);
// Registers a missing functionality.
@@ -67,7 +59,6 @@ public:
// Returns all messages accumulated in the order of:
// TBD functionalities, missing functionalities, warnings, errors.
std::string getAllMessages() const;
#endif
private:
SpvBuildLogger(const SpvBuildLogger&);
@@ -0,0 +1,171 @@
// Copyright (c) 2018 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
// IN THE MATERIALS.
#ifndef SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_
#define SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_
#ifdef __cplusplus
extern "C" {
#endif
enum {
NonSemanticShaderDebugInfo100Version = 100,
NonSemanticShaderDebugInfo100Version_BitWidthPadding = 0x7fffffff
};
enum {
NonSemanticShaderDebugInfo100Revision = 6,
NonSemanticShaderDebugInfo100Revision_BitWidthPadding = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100Instructions {
NonSemanticShaderDebugInfo100DebugInfoNone = 0,
NonSemanticShaderDebugInfo100DebugCompilationUnit = 1,
NonSemanticShaderDebugInfo100DebugTypeBasic = 2,
NonSemanticShaderDebugInfo100DebugTypePointer = 3,
NonSemanticShaderDebugInfo100DebugTypeQualifier = 4,
NonSemanticShaderDebugInfo100DebugTypeArray = 5,
NonSemanticShaderDebugInfo100DebugTypeVector = 6,
NonSemanticShaderDebugInfo100DebugTypedef = 7,
NonSemanticShaderDebugInfo100DebugTypeFunction = 8,
NonSemanticShaderDebugInfo100DebugTypeEnum = 9,
NonSemanticShaderDebugInfo100DebugTypeComposite = 10,
NonSemanticShaderDebugInfo100DebugTypeMember = 11,
NonSemanticShaderDebugInfo100DebugTypeInheritance = 12,
NonSemanticShaderDebugInfo100DebugTypePtrToMember = 13,
NonSemanticShaderDebugInfo100DebugTypeTemplate = 14,
NonSemanticShaderDebugInfo100DebugTypeTemplateParameter = 15,
NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter = 16,
NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack = 17,
NonSemanticShaderDebugInfo100DebugGlobalVariable = 18,
NonSemanticShaderDebugInfo100DebugFunctionDeclaration = 19,
NonSemanticShaderDebugInfo100DebugFunction = 20,
NonSemanticShaderDebugInfo100DebugLexicalBlock = 21,
NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator = 22,
NonSemanticShaderDebugInfo100DebugScope = 23,
NonSemanticShaderDebugInfo100DebugNoScope = 24,
NonSemanticShaderDebugInfo100DebugInlinedAt = 25,
NonSemanticShaderDebugInfo100DebugLocalVariable = 26,
NonSemanticShaderDebugInfo100DebugInlinedVariable = 27,
NonSemanticShaderDebugInfo100DebugDeclare = 28,
NonSemanticShaderDebugInfo100DebugValue = 29,
NonSemanticShaderDebugInfo100DebugOperation = 30,
NonSemanticShaderDebugInfo100DebugExpression = 31,
NonSemanticShaderDebugInfo100DebugMacroDef = 32,
NonSemanticShaderDebugInfo100DebugMacroUndef = 33,
NonSemanticShaderDebugInfo100DebugImportedEntity = 34,
NonSemanticShaderDebugInfo100DebugSource = 35,
NonSemanticShaderDebugInfo100DebugFunctionDefinition = 101,
NonSemanticShaderDebugInfo100DebugSourceContinued = 102,
NonSemanticShaderDebugInfo100DebugLine = 103,
NonSemanticShaderDebugInfo100DebugNoLine = 104,
NonSemanticShaderDebugInfo100DebugBuildIdentifier = 105,
NonSemanticShaderDebugInfo100DebugStoragePath = 106,
NonSemanticShaderDebugInfo100DebugEntryPoint = 107,
NonSemanticShaderDebugInfo100DebugTypeMatrix = 108,
NonSemanticShaderDebugInfo100InstructionsMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugInfoFlags {
NonSemanticShaderDebugInfo100None = 0x0000,
NonSemanticShaderDebugInfo100FlagIsProtected = 0x01,
NonSemanticShaderDebugInfo100FlagIsPrivate = 0x02,
NonSemanticShaderDebugInfo100FlagIsPublic = 0x03,
NonSemanticShaderDebugInfo100FlagIsLocal = 0x04,
NonSemanticShaderDebugInfo100FlagIsDefinition = 0x08,
NonSemanticShaderDebugInfo100FlagFwdDecl = 0x10,
NonSemanticShaderDebugInfo100FlagArtificial = 0x20,
NonSemanticShaderDebugInfo100FlagExplicit = 0x40,
NonSemanticShaderDebugInfo100FlagPrototyped = 0x80,
NonSemanticShaderDebugInfo100FlagObjectPointer = 0x100,
NonSemanticShaderDebugInfo100FlagStaticMember = 0x200,
NonSemanticShaderDebugInfo100FlagIndirectVariable = 0x400,
NonSemanticShaderDebugInfo100FlagLValueReference = 0x800,
NonSemanticShaderDebugInfo100FlagRValueReference = 0x1000,
NonSemanticShaderDebugInfo100FlagIsOptimized = 0x2000,
NonSemanticShaderDebugInfo100FlagIsEnumClass = 0x4000,
NonSemanticShaderDebugInfo100FlagTypePassByValue = 0x8000,
NonSemanticShaderDebugInfo100FlagTypePassByReference = 0x10000,
NonSemanticShaderDebugInfo100FlagUnknownPhysicalLayout = 0x20000,
NonSemanticShaderDebugInfo100DebugInfoFlagsMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100BuildIdentifierFlags {
NonSemanticShaderDebugInfo100IdentifierPossibleDuplicates = 0x01,
NonSemanticShaderDebugInfo100BuildIdentifierFlagsMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncoding {
NonSemanticShaderDebugInfo100Unspecified = 0,
NonSemanticShaderDebugInfo100Address = 1,
NonSemanticShaderDebugInfo100Boolean = 2,
NonSemanticShaderDebugInfo100Float = 3,
NonSemanticShaderDebugInfo100Signed = 4,
NonSemanticShaderDebugInfo100SignedChar = 5,
NonSemanticShaderDebugInfo100Unsigned = 6,
NonSemanticShaderDebugInfo100UnsignedChar = 7,
NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncodingMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugCompositeType {
NonSemanticShaderDebugInfo100Class = 0,
NonSemanticShaderDebugInfo100Structure = 1,
NonSemanticShaderDebugInfo100Union = 2,
NonSemanticShaderDebugInfo100DebugCompositeTypeMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugTypeQualifier {
NonSemanticShaderDebugInfo100ConstType = 0,
NonSemanticShaderDebugInfo100VolatileType = 1,
NonSemanticShaderDebugInfo100RestrictType = 2,
NonSemanticShaderDebugInfo100AtomicType = 3,
NonSemanticShaderDebugInfo100DebugTypeQualifierMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugOperation {
NonSemanticShaderDebugInfo100Deref = 0,
NonSemanticShaderDebugInfo100Plus = 1,
NonSemanticShaderDebugInfo100Minus = 2,
NonSemanticShaderDebugInfo100PlusUconst = 3,
NonSemanticShaderDebugInfo100BitPiece = 4,
NonSemanticShaderDebugInfo100Swap = 5,
NonSemanticShaderDebugInfo100Xderef = 6,
NonSemanticShaderDebugInfo100StackValue = 7,
NonSemanticShaderDebugInfo100Constu = 8,
NonSemanticShaderDebugInfo100Fragment = 9,
NonSemanticShaderDebugInfo100DebugOperationMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugImportedEntity {
NonSemanticShaderDebugInfo100ImportedModule = 0,
NonSemanticShaderDebugInfo100ImportedDeclaration = 1,
NonSemanticShaderDebugInfo100DebugImportedEntityMax = 0x7fffffff
};
#ifdef __cplusplus
}
#endif
#endif // SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_
+41 -15
View File
@@ -36,10 +36,6 @@
#include "SPVRemapper.h"
#include "doc.h"
#if !defined (use_cpp11)
// ... not supported before C++11
#else // defined (use_cpp11)
#include <algorithm>
#include <cassert>
#include "../glslang/Include/Common.h"
@@ -160,15 +156,29 @@ namespace spv {
}
// Is this an opcode we should remove when using --strip?
bool spirvbin_t::isStripOp(spv::Op opCode) const
bool spirvbin_t::isStripOp(spv::Op opCode, unsigned start) const
{
switch (opCode) {
case spv::OpSource:
case spv::OpSourceExtension:
case spv::OpName:
case spv::OpMemberName:
case spv::OpLine: return true;
default: return false;
case spv::OpLine :
{
const std::string name = literalString(start + 2);
std::vector<std::string>::const_iterator it;
for (it = stripWhiteList.begin(); it < stripWhiteList.end(); it++)
{
if (name.find(*it) != std::string::npos) {
return false;
}
}
return true;
}
default :
return false;
}
}
@@ -297,15 +307,21 @@ namespace spv {
std::string spirvbin_t::literalString(unsigned word) const
{
std::string literal;
const spirword_t * pos = spv.data() + word;
literal.reserve(16);
const char* bytes = reinterpret_cast<const char*>(spv.data() + word);
while (bytes && *bytes)
literal += *bytes++;
do {
spirword_t word = *pos;
for (int i = 0; i < 4; i++) {
char c = word & 0xff;
if (c == '\0')
return literal;
literal += c;
word >>= 8;
}
pos++;
} while (true);
}
void spirvbin_t::applyMap()
@@ -366,7 +382,7 @@ namespace spv {
process(
[&](spv::Op opCode, unsigned start) {
// remember opcodes we want to strip later
if (isStripOp(opCode))
if (isStripOp(opCode, start))
stripInst(start);
return true;
},
@@ -664,6 +680,7 @@ namespace spv {
case spv::OperandKernelEnqueueFlags:
case spv::OperandKernelProfilingInfo:
case spv::OperandCapability:
case spv::OperandCooperativeMatrixOperands:
++word;
break;
@@ -1488,8 +1505,19 @@ namespace spv {
}
// remap from a memory image
void spirvbin_t::remap(std::vector<std::uint32_t>& in_spv, const std::vector<std::string>& whiteListStrings,
std::uint32_t opts)
{
stripWhiteList = whiteListStrings;
spv.swap(in_spv);
remap(opts);
spv.swap(in_spv);
}
// remap from a memory image - legacy interface without white list
void spirvbin_t::remap(std::vector<std::uint32_t>& in_spv, std::uint32_t opts)
{
stripWhiteList.clear();
spv.swap(in_spv);
remap(opts);
spv.swap(in_spv);
@@ -1497,5 +1525,3 @@ namespace spv {
} // namespace SPV
#endif // defined (use_cpp11)
+9 -29
View File
@@ -43,12 +43,6 @@
namespace spv {
// MSVC defines __cplusplus as an older value, even when it supports almost all of 11.
// We handle that here by making our own symbol.
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1700)
# define use_cpp11 1
#endif
class spirvbin_base_t
{
public:
@@ -74,27 +68,6 @@ public:
} // namespace SPV
#if !defined (use_cpp11)
#include <cstdio>
#include <cstdint>
namespace spv {
class spirvbin_t : public spirvbin_base_t
{
public:
spirvbin_t(int /*verbose = 0*/) { }
void remap(std::vector<std::uint32_t>& /*spv*/, unsigned int /*opts = 0*/)
{
printf("Tool not compiled for C++11, which is required for SPIR-V remapping.\n");
exit(5);
}
};
} // namespace SPV
#else // defined (use_cpp11)
#include <functional>
#include <cstdint>
#include <unordered_map>
@@ -104,9 +77,9 @@ public:
#include <cassert>
#include "spirv.hpp"
#include "spvIR.h"
namespace spv {
const Id NoResult = 0;
// class to hold SPIR-V binary data for remapping, DCE, and debug stripping
class spirvbin_t : public spirvbin_base_t
@@ -118,6 +91,10 @@ public:
virtual ~spirvbin_t() { }
// remap on an existing binary in memory
void remap(std::vector<std::uint32_t>& spv, const std::vector<std::string>& whiteListStrings,
std::uint32_t opts = DO_EVERYTHING);
// remap on an existing binary in memory - legacy interface without white list
void remap(std::vector<std::uint32_t>& spv, std::uint32_t opts = DO_EVERYTHING);
// Type for error/log handler functions
@@ -180,6 +157,8 @@ private:
unsigned typeSizeInWords(spv::Id id) const;
unsigned idTypeSizeInWords(spv::Id id) const;
bool isStripOp(spv::Op opCode, unsigned start) const;
spv::Id& asId(unsigned word) { return spv[word]; }
const spv::Id& asId(unsigned word) const { return spv[word]; }
spv::Op asOpCode(unsigned word) const { return opOpCode(spv[word]); }
@@ -249,6 +228,8 @@ private:
std::vector<spirword_t> spv; // SPIR words
std::vector<std::string> stripWhiteList;
namemap_t nameMap; // ID names from OpName
// Since we want to also do binary ops, we can't use std::vector<bool>. we could use
@@ -300,5 +281,4 @@ private:
} // namespace SPV
#endif // defined (use_cpp11)
#endif // SPIRVREMAPPER_H
File diff suppressed because it is too large Load Diff
+168 -44
View File
@@ -50,6 +50,10 @@
#include "Logger.h"
#include "spirv.hpp"
#include "spvIR.h"
namespace spv {
#include "GLSL.ext.KHR.h"
#include "NonSemanticShaderDebugInfo100.h"
}
#include <algorithm>
#include <map>
@@ -82,7 +86,7 @@ public:
void setSource(spv::SourceLanguage lang, int version)
{
source = lang;
sourceLang = lang;
sourceVersion = version;
}
spv::Id getStringId(const std::string& str)
@@ -99,14 +103,54 @@ public:
stringIds[file_c_str] = strId;
return strId;
}
void setSourceFile(const std::string& file)
spv::Id getMainFileId() const { return mainFileId; }
// Initialize the main source file name
void setDebugSourceFile(const std::string& file)
{
sourceFileStringId = getStringId(file);
if (trackDebugInfo) {
dirtyLineTracker = true;
mainFileId = getStringId(file);
currentFileId = mainFileId;
}
}
// Set the debug source location tracker in the builder.
// The upcoming instructions in basic blocks will be associated to this location.
void setDebugSourceLocation(int line, const char* filename)
{
if (trackDebugInfo) {
dirtyLineTracker = true;
if (line != 0) {
// TODO: This is special handling of some AST nodes having (untracked) line 0.
// But they should have a valid line number.
currentLine = line;
if (filename) {
currentFileId = getStringId(filename);
}
}
}
}
void setSourceText(const std::string& text) { sourceText = text; }
void addSourceExtension(const char* ext) { sourceExtensions.push_back(ext); }
void addModuleProcessed(const std::string& p) { moduleProcesses.push_back(p.c_str()); }
void setEmitOpLines() { emitOpLines = true; }
void setEmitSpirvDebugInfo()
{
trackDebugInfo = true;
emitSpirvDebugInfo = true;
}
void setEmitNonSemanticShaderDebugInfo(bool emitSourceText)
{
trackDebugInfo = true;
emitNonSemanticShaderDebugInfo = true;
importNonSemanticShaderDebugInfoInstructions();
if (emitSourceText) {
emitNonSemanticShaderDebugSource = emitSourceText;
}
}
void addExtension(const char* ext) { extensions.insert(ext); }
void removeExtension(const char* ext)
{
@@ -147,19 +191,6 @@ public:
return id;
}
// Generate OpLine for non-filename-based #line directives (ie no filename
// seen yet): Log the current line, and if different than the last one,
// issue a new OpLine using the new line and current source file name.
void setLine(int line);
// If filename null, generate OpLine for non-filename-based line directives,
// else do filename-based: Log the current line and file, and if different
// than the last one, issue a new OpLine using the new line and file
// name.
void setLine(int line, const char* filename);
// Low-level OpLine. See setLine() for a layered helper.
void addLine(Id fileName, int line, int column);
// For creating new types (will return old type if the requested one was already made).
Id makeVoidType();
Id makeBoolType();
@@ -170,7 +201,7 @@ public:
Id makeIntType(int width) { return makeIntegerType(width, true); }
Id makeUintType(int width) { return makeIntegerType(width, false); }
Id makeFloatType(int width);
Id makeStructType(const std::vector<Id>& members, const char*);
Id makeStructType(const std::vector<Id>& members, const char* name, bool const compilerGenerated = true);
Id makeStructResultType(Id type0, Id type1);
Id makeVectorType(Id component, int size);
Id makeMatrixType(Id component, int cols, int rows);
@@ -180,13 +211,51 @@ public:
Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format);
Id makeSamplerType();
Id makeSampledImageType(Id imageType);
Id makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols);
Id makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use);
Id makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols);
Id makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType);
Id makeGenericType(spv::Op opcode, std::vector<spv::IdImmediate>& operands);
// SPIR-V NonSemantic Shader DebugInfo Instructions
struct DebugTypeLoc {
std::string name {};
int line {0};
int column {0};
};
std::unordered_map<Id, DebugTypeLoc> debugTypeLocs;
Id makeDebugInfoNone();
Id makeBoolDebugType(int const size);
Id makeIntegerDebugType(int const width, bool const hasSign);
Id makeFloatDebugType(int const width);
Id makeSequentialDebugType(Id const baseType, Id const componentCount, NonSemanticShaderDebugInfo100Instructions const sequenceType);
Id makeArrayDebugType(Id const baseType, Id const componentCount);
Id makeVectorDebugType(Id const baseType, int const componentCount);
Id makeMatrixDebugType(Id const vectorType, int const vectorCount, bool columnMajor = true);
Id makeMemberDebugType(Id const memberType, DebugTypeLoc const& debugTypeLoc);
Id makeCompositeDebugType(std::vector<Id> const& memberTypes, char const*const name,
NonSemanticShaderDebugInfo100DebugCompositeType const tag, bool const isOpaqueType = false);
Id makePointerDebugType(StorageClass storageClass, Id const baseType);
Id makeDebugSource(const Id fileName);
Id makeDebugCompilationUnit();
Id createDebugGlobalVariable(Id const type, char const*const name, Id const variable);
Id createDebugLocalVariable(Id type, char const*const name, size_t const argNumber = 0);
Id makeDebugExpression();
Id makeDebugDeclare(Id const debugLocalVariable, Id const pointer);
Id makeDebugValue(Id const debugLocalVariable, Id const value);
Id makeDebugFunctionType(Id returnType, const std::vector<Id>& paramTypes);
Id makeDebugFunction(Function* function, Id nameId, Id funcTypeId);
Id makeDebugLexicalBlock(uint32_t line);
std::string unmangleFunctionName(std::string const& name) const;
void setupDebugFunctionEntry(Function* function, const char* name, int line,
const std::vector<Id>& paramTypes,
const std::vector<char const*>& paramNames);
// accelerationStructureNV type
Id makeAccelerationStructureType();
// rayQueryEXT type
Id makeRayQueryType();
// hitObjectNV type
Id makeHitObjectNVType();
// For querying about types.
Id getTypeId(Id resultId) const { return module.getTypeId(resultId); }
@@ -204,6 +273,7 @@ public:
ImageFormat getImageTypeFormat(Id typeId) const
{ return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); }
Id getResultingAccessChainType() const;
Id getIdOperand(Id resultId, int idx) { return module.getInstruction(resultId)->getIdOperand(idx); }
bool isPointer(Id resultId) const { return isPointerType(getTypeId(resultId)); }
bool isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); }
@@ -228,11 +298,10 @@ public:
bool isMatrixType(Id typeId) const { return getTypeClass(typeId) == OpTypeMatrix; }
bool isStructType(Id typeId) const { return getTypeClass(typeId) == OpTypeStruct; }
bool isArrayType(Id typeId) const { return getTypeClass(typeId) == OpTypeArray; }
#ifdef GLSLANG_WEB
bool isCooperativeMatrixType(Id typeId)const { return false; }
#else
bool isCooperativeMatrixType(Id typeId)const { return getTypeClass(typeId) == OpTypeCooperativeMatrixNV; }
#endif
bool isCooperativeMatrixType(Id typeId)const
{
return getTypeClass(typeId) == OpTypeCooperativeMatrixKHR || getTypeClass(typeId) == OpTypeCooperativeMatrixNV;
}
bool isAggregateType(Id typeId) const
{ return isArrayType(typeId) || isStructType(typeId) || isCooperativeMatrixType(typeId); }
bool isImageType(Id typeId) const { return getTypeClass(typeId) == OpTypeImage; }
@@ -318,6 +387,8 @@ public:
Id makeFloat16Constant(float f16, bool specConstant = false);
Id makeFpConstant(Id type, double d, bool specConstant = false);
Id importNonSemanticShaderDebugInfoInstructions();
// Turn the array of constants into a proper spv constant of the requested type.
Id makeCompositeConstant(Id type, const std::vector<Id>& comps, bool specConst = false);
@@ -332,6 +403,7 @@ public:
void addDecoration(Id, Decoration, const char*);
void addDecoration(Id, Decoration, const std::vector<unsigned>& literals);
void addDecoration(Id, Decoration, const std::vector<const char*>& strings);
void addLinkageDecoration(Id id, const char* name, spv::LinkageType linkType);
void addDecorationId(Id id, Decoration, Id idDecoration);
void addDecorationId(Id id, Decoration, const std::vector<Id>& operandIds);
void addMemberDecoration(Id, unsigned int member, Decoration, int num = -1);
@@ -340,9 +412,19 @@ public:
void addMemberDecoration(Id, unsigned int member, Decoration, const std::vector<const char*>& strings);
// At the end of what block do the next create*() instructions go?
void setBuildPoint(Block* bp) { buildPoint = bp; }
// Also reset current last DebugScope and current source line to unknown
void setBuildPoint(Block* bp) {
buildPoint = bp;
// TODO: Technically, change of build point should set line tracker dirty. But we'll have bad line info for
// branch instructions. Commenting this for now because at least this matches the old behavior.
dirtyScopeTracker = true;
}
Block* getBuildPoint() const { return buildPoint; }
// Append an instruction to the end of the current build point.
// Optionally, additional debug info instructions may also be prepended.
void addInstruction(std::unique_ptr<Instruction> inst);
// Make the entry-point function. The returned pointer is only valid
// for the lifetime of this builder.
Function* makeEntryPoint(const char*);
@@ -350,13 +432,23 @@ public:
// Make a shader-style function, and create its entry block if entry is non-zero.
// Return the function, pass back the entry.
// The returned pointer is only valid for the lifetime of this builder.
Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name,
const std::vector<Id>& paramTypes, const std::vector<std::vector<Decoration>>& precisions, Block **entry = 0);
Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType,
const std::vector<Id>& paramTypes,
const std::vector<std::vector<Decoration>>& precisions, Block** entry = nullptr);
// Create a return. An 'implicit' return is one not appearing in the source
// code. In the case of an implicit return, no post-return block is inserted.
void makeReturn(bool implicit, Id retVal = 0);
// Initialize state and generate instructions for new lexical scope
void enterLexicalBlock(uint32_t line);
// Set state and generate instructions to exit current lexical scope
void leaveLexicalBlock();
// Prepare builder for generation of instructions for a function.
void enterFunction(Function const* function);
// Generate all the code needed to finish up a function.
void leaveFunction();
@@ -364,9 +456,13 @@ public:
// discard, terminate-invocation, terminateRayEXT, or ignoreIntersectionEXT
void makeStatementTerminator(spv::Op opcode, const char *name);
// Create block terminator instruction for statements that have input operands
// such as OpEmitMeshTasksEXT
void makeStatementTerminator(spv::Op opcode, const std::vector<Id>& operands, const char* name);
// Create a global or function local or IO variable.
Id createVariable(Decoration precision, StorageClass, Id type, const char* name = nullptr,
Id initializer = NoResult);
Id createVariable(Decoration precision, StorageClass storageClass, Id type, const char* name = nullptr,
Id initializer = NoResult, bool const compilerGenerated = true);
// Create an intermediate with an undefined value.
Id createUndefined(Id type);
@@ -386,8 +482,10 @@ public:
// Create an OpArrayLength instruction
Id createArrayLength(Id base, unsigned int member);
// Create an OpCooperativeMatrixLengthKHR instruction
Id createCooperativeMatrixLengthKHR(Id type);
// Create an OpCooperativeMatrixLengthNV instruction
Id createCooperativeMatrixLength(Id type);
Id createCooperativeMatrixLengthNV(Id type);
// Create an OpCompositeExtract instruction
Id createCompositeExtract(Id composite, Id typeId, unsigned index);
@@ -622,11 +720,6 @@ public:
// Accumulate whether anything in the chain of structures has coherent decorations.
struct CoherentFlags {
CoherentFlags() { clear(); }
#ifdef GLSLANG_WEB
void clear() { }
bool isVolatile() const { return false; }
CoherentFlags operator |=(const CoherentFlags &other) { return *this; }
#else
bool isVolatile() const { return volatil; }
bool isNonUniform() const { return nonUniform; }
bool anyCoherent() const {
@@ -671,7 +764,6 @@ public:
nonUniform |= other.nonUniform;
return *this;
}
#endif
};
CoherentFlags coherentFlags;
};
@@ -752,19 +844,17 @@ public:
// Add capabilities, extensions, remove unneeded decorations, etc.,
// based on the resulting SPIR-V.
void postProcess();
void postProcess(bool compileOnly);
// Prune unreachable blocks in the CFG and remove unneeded decorations.
void postProcessCFG();
#ifndef GLSLANG_WEB
// Add capabilities, extensions based on instructions in the module.
void postProcessFeatures();
// Hook to visit each instruction in a block in a function
void postProcess(Instruction&);
// Hook to visit each non-32-bit sized float/int operation in a block.
void postProcessType(const Instruction&, spv::Id typeId);
#endif
void dump(std::vector<unsigned int>&) const;
@@ -801,13 +891,39 @@ public:
const;
unsigned int spvVersion; // the version of SPIR-V to emit in the header
SourceLanguage source;
SourceLanguage sourceLang;
int sourceVersion;
spv::Id sourceFileStringId;
spv::Id nonSemanticShaderCompilationUnitId {0};
spv::Id nonSemanticShaderDebugInfo {0};
spv::Id debugInfoNone {0};
spv::Id debugExpression {0}; // Debug expression with zero operations.
std::string sourceText;
int currentLine;
const char* currentFile;
bool emitOpLines;
// True if an new OpLine/OpDebugLine may need to be inserted. Either:
// 1. The current debug location changed
// 2. The current build point changed
bool dirtyLineTracker;
int currentLine = 0;
// OpString id of the current file name. Always 0 if debug info is off.
spv::Id currentFileId = 0;
// OpString id of the main file name. Always 0 if debug info is off.
spv::Id mainFileId = 0;
// True if an new OpDebugScope may need to be inserted. Either:
// 1. A new lexical block is pushed
// 2. The current build point changed
bool dirtyScopeTracker;
std::stack<spv::Id> currentDebugScopeId;
// This flag toggles tracking of debug info while building the SPIR-V.
bool trackDebugInfo = false;
// This flag toggles emission of SPIR-V debug instructions, like OpLine and OpSource.
bool emitSpirvDebugInfo = false;
// This flag toggles emission of Non-Semantic Debug extension debug instructions.
bool emitNonSemanticShaderDebugInfo = false;
bool restoreNonSemanticShaderDebugInfo = false;
bool emitNonSemanticShaderDebugSource = false;
std::set<std::string> extensions;
std::vector<const char*> sourceExtensions;
std::vector<const char*> moduleProcesses;
@@ -841,6 +957,8 @@ public:
std::unordered_map<unsigned int, std::vector<Instruction*>> groupedStructConstants;
// map type opcodes to type instructions
std::unordered_map<unsigned int, std::vector<Instruction*>> groupedTypes;
// map type opcodes to debug type instructions
std::unordered_map<unsigned int, std::vector<Instruction*>> groupedDebugTypes;
// list of OpConstantNull instructions
std::vector<Instruction*> nullConstants;
@@ -856,6 +974,12 @@ public:
// map from include file name ids to their contents
std::map<spv::Id, const std::string*> includeFiles;
// map from core id to debug id
std::map <spv::Id, spv::Id> debugId;
// map from file name string id to DebugSource id
std::unordered_map<spv::Id, spv::Id> debugSourceId;
// The stream for outputting warnings and errors.
SpvBuildLogger* logger;
}; // end Builder class
@@ -52,11 +52,12 @@ namespace spv {
#include "GLSL.ext.EXT.h"
#include "GLSL.ext.AMD.h"
#include "GLSL.ext.NV.h"
#include "GLSL.ext.ARM.h"
#include "GLSL.ext.QCOM.h"
}
namespace spv {
#ifndef GLSLANG_WEB
// Hook to visit each operand type and result type of an instruction.
// Will be called multiple times for one instruction, once for each typed
// operand and the result.
@@ -180,6 +181,7 @@ void Builder::postProcessType(const Instruction& inst, Id typeId)
else if (width == 8)
addCapability(CapabilityInt8);
}
break;
default:
if (basicTypeOp == OpTypeInt) {
if (width == 16)
@@ -333,7 +335,6 @@ void Builder::postProcess(Instruction& inst)
}
}
}
#endif
// comment in header
void Builder::postProcessCFG()
@@ -394,7 +395,6 @@ void Builder::postProcessCFG()
decorations.end());
}
#ifndef GLSLANG_WEB
// comment in header
void Builder::postProcessFeatures() {
// Add per-instruction capabilities, extensions, etc.,
@@ -482,14 +482,15 @@ void Builder::postProcessFeatures() {
}
}
}
#endif
// comment in header
void Builder::postProcess() {
void Builder::postProcess(bool compileOnly)
{
// postProcessCFG needs an entrypoint to determine what is reachable, but if we are not creating an "executable" shader, we don't have an entrypoint
if (!compileOnly)
postProcessCFG();
#ifndef GLSLANG_WEB
postProcessFeatures();
#endif
}
}; // end spv namespace
+53 -20
View File
@@ -68,26 +68,8 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog
}
case glslang::EShTargetVulkan_1_2:
return spv_target_env::SPV_ENV_VULKAN_1_2;
case glslang::EShTargetUniversal:
switch (spvVersion.spv) {
case EShTargetSpv_1_0:
return spv_target_env::SPV_ENV_UNIVERSAL_1_0;
case EShTargetSpv_1_1:
return spv_target_env::SPV_ENV_UNIVERSAL_1_1;
case EShTargetSpv_1_2:
return spv_target_env::SPV_ENV_UNIVERSAL_1_2;
case EShTargetSpv_1_3:
return spv_target_env::SPV_ENV_UNIVERSAL_1_3;
case EShTargetSpv_1_4:
return spv_target_env::SPV_ENV_UNIVERSAL_1_4;
case EShTargetSpv_1_5:
return spv_target_env::SPV_ENV_UNIVERSAL_1_5;
case EShTargetSpv_1_6:
return spv_target_env::SPV_ENV_UNIVERSAL_1_6;
default:
logger->missingFunctionality("Target version for SPIRV-Tools validator");
return spv_target_env::SPV_ENV_UNIVERSAL_1_6;
}
case glslang::EShTargetVulkan_1_3:
return spv_target_env::SPV_ENV_VULKAN_1_3;
default:
break;
}
@@ -230,6 +212,7 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
optimizer.RegisterPass(spvtools::CreateInterpolateFixupPass());
if (options->optimizeSize) {
optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass());
optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsSafePass());
}
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
optimizer.RegisterPass(spvtools::CreateCFGCleanupPass());
@@ -240,6 +223,56 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
}
bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
std::unordered_set<uint32_t>* live_locs,
std::unordered_set<uint32_t>* live_builtins,
spv::SpvBuildLogger*)
{
spvtools::Optimizer optimizer(target_env);
optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
optimizer.RegisterPass(spvtools::CreateAnalyzeLiveInputPass(live_locs, live_builtins));
spvtools::OptimizerOptions spvOptOptions;
optimizer.SetTargetEnv(target_env);
spvOptOptions.set_run_validator(false);
return optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
}
void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
std::unordered_set<uint32_t>* live_locs,
std::unordered_set<uint32_t>* live_builtins,
spv::SpvBuildLogger*)
{
spvtools::Optimizer optimizer(target_env);
optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
optimizer.RegisterPass(spvtools::CreateEliminateDeadOutputStoresPass(live_locs, live_builtins));
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass(false, true));
optimizer.RegisterPass(spvtools::CreateEliminateDeadOutputComponentsPass());
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass(false, true));
spvtools::OptimizerOptions spvOptOptions;
optimizer.SetTargetEnv(target_env);
spvOptOptions.set_run_validator(false);
optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
}
void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector<unsigned int>& spirv,
spv::SpvBuildLogger*)
{
spvtools::Optimizer optimizer(target_env);
optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsPass());
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
spvtools::OptimizerOptions spvOptOptions;
optimizer.SetTargetEnv(target_env);
spvOptOptions.set_run_validator(false);
optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
}
// Apply the SPIRV-Tools optimizer to strip debug info from SPIR-V. This is implicitly done by
// SpirvToolsTransform if spvOptions->stripDebugInfo is set, but can be called separately if
// optimization is disabled.

Some files were not shown because too many files have changed in this diff Show More