upgrade SDL3 to d4b80726142d9108f16d4806c09779d612501608

This commit is contained in:
Alex Zenla
2024-09-01 07:26:53 -04:00
committed by a dinosaur
parent f2031ac442
commit fbf66585eb
226 changed files with 24489 additions and 11757 deletions

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>24B5009l</string>
<string>24B5035e</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
@ -31,19 +31,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>24A5298f</string>
<string>24B5024b</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>15.0</string>
<string>15.1</string>
<key>DTSDKBuild</key>
<string>24A5298f</string>
<string>24B5024b</string>
<key>DTSDKName</key>
<string>macosx15.0</string>
<string>macosx15.1</string>
<key>DTXcode</key>
<string>1600</string>
<string>1610</string>
<key>DTXcodeBuild</key>
<string>16A5211f</string>
<string>16B5001e</string>
<key>LSMinimumSystemVersion</key>
<string>10.11</string>
</dict>

View File

@ -0,0 +1,68 @@
#!/bin/bash
set -x
set -e
cd `dirname "$0"`
shadernames=(FullscreenVert BlitFrom2D BlitFrom2DArray BlitFrom3D BlitFromCube)
generate_shaders()
{
fileplatform=$1
compileplatform=$2
sdkplatform=$3
minversion=$4
for shadername in "${shadernames[@]}"; do
xcrun -sdk $sdkplatform metal -c -std=$compileplatform-metal1.1 -m$sdkplatform-version-min=$minversion -Wall -O3 -D COMPILE_$shadername -o ./$shadername.air ./Metal_Blit.metal || exit $?
xcrun -sdk $sdkplatform metallib -o $shadername.metallib $shadername.air || exit $?
xxd -i $shadername.metallib | perl -w -p -e 's/\Aunsigned /const unsigned /;' >./${shadername}_$fileplatform.h
rm -f $shadername.air $shadername.metallib
done
}
generate_shaders macos macos macosx 10.11
generate_shaders ios ios iphoneos 8.0
generate_shaders iphonesimulator ios iphonesimulator 8.0
generate_shaders tvos ios appletvos 9.0
generate_shaders tvsimulator ios appletvsimulator 9.0
# Bundle together one mega-header
catShaders()
{
target=$1
for shadername in "${shadernames[@]}"; do
cat ${shadername}_$target.h >> Metal_Blit.h
done
}
rm -f Metal_Blit.h
echo "#if defined(SDL_PLATFORM_IOS)" >> Metal_Blit.h
echo "#if TARGET_OS_SIMULATOR" >> Metal_Blit.h
catShaders iphonesimulator
echo "#else" >> Metal_Blit.h
catShaders ios
echo "#endif" >> Metal_Blit.h
echo "#elif defined(SDL_PLATFORM_TVOS)" >> Metal_Blit.h
echo "#if TARGET_OS_SIMULATOR" >> Metal_Blit.h
catShaders tvsimulator
echo "#else" >> Metal_Blit.h
catShaders tvos
echo "#endif" >> Metal_Blit.h
echo "#else" >> Metal_Blit.h
catShaders macos
echo "#endif" >> Metal_Blit.h
# Clean up
cleanupShaders()
{
target=$1
for shadername in "${shadernames[@]}"; do
rm -f ${shadername}_$target.h
done
}
cleanupShaders iphonesimulator
cleanupShaders ios
cleanupShaders tvsimulator
cleanupShaders tvos
cleanupShaders macos