From 30f41c02aec763d32e62351452da9ef582bc3472 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Fri, 6 Mar 2026 13:30:59 -0800 Subject: Move contrib libraries to contrib repo --- contrib/SDL-3.2.8/src/gpu/metal/compile_shaders.sh | 68 ---------------------- 1 file changed, 68 deletions(-) delete mode 100755 contrib/SDL-3.2.8/src/gpu/metal/compile_shaders.sh (limited to 'contrib/SDL-3.2.8/src/gpu/metal/compile_shaders.sh') diff --git a/contrib/SDL-3.2.8/src/gpu/metal/compile_shaders.sh b/contrib/SDL-3.2.8/src/gpu/metal/compile_shaders.sh deleted file mode 100755 index 0b8c33c..0000000 --- a/contrib/SDL-3.2.8/src/gpu/metal/compile_shaders.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -set -x -set -e -cd `dirname "$0"` - -shadernames=(FullscreenVert BlitFrom2D BlitFrom2DArray BlitFrom3D BlitFromCube BlitFromCubeArray) - -generate_shaders() -{ - fileplatform=$1 - compileplatform=$2 - sdkplatform=$3 - minversion=$4 - - for shadername in "${shadernames[@]}"; do - xcrun -sdk $sdkplatform metal -c -std=$compileplatform-metal2.0 -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 11.0 -generate_shaders iphonesimulator ios iphonesimulator 11.0 -generate_shaders tvos ios appletvos 11.0 -generate_shaders tvsimulator ios appletvsimulator 11.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 \ No newline at end of file -- cgit v1.2.3