ruby2d 0.11.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/assets/include/SDL2/SDL.h +108 -14
- data/assets/include/SDL2/SDL_assert.h +81 -50
- data/assets/include/SDL2/SDL_atomic.h +135 -35
- data/assets/include/SDL2/SDL_audio.h +960 -355
- data/assets/include/SDL2/SDL_bits.h +11 -6
- data/assets/include/SDL2/SDL_blendmode.h +91 -14
- data/assets/include/SDL2/SDL_clipboard.h +30 -7
- data/assets/include/SDL2/SDL_config.h +3 -1
- data/assets/include/SDL2/SDL_config_android.h +11 -1
- data/assets/include/SDL2/SDL_config_emscripten.h +216 -0
- data/assets/include/SDL2/SDL_config_iphoneos.h +9 -1
- data/assets/include/SDL2/SDL_config_macosx.h +16 -2
- data/assets/include/SDL2/SDL_config_minimal.h +4 -1
- data/assets/include/SDL2/SDL_config_os2.h +37 -20
- data/assets/include/SDL2/SDL_config_pandora.h +6 -1
- data/assets/include/SDL2/SDL_config_psp.h +8 -8
- data/assets/include/SDL2/SDL_config_windows.h +39 -22
- data/assets/include/SDL2/SDL_config_winrt.h +23 -8
- data/assets/include/SDL2/SDL_config_wiz.h +6 -1
- data/assets/include/SDL2/SDL_copying.h +1 -1
- data/assets/include/SDL2/SDL_cpuinfo.h +331 -71
- data/assets/include/SDL2/SDL_egl.h +906 -280
- data/assets/include/SDL2/SDL_endian.h +101 -47
- data/assets/include/SDL2/SDL_error.h +70 -19
- data/assets/include/SDL2/SDL_events.h +387 -79
- data/assets/include/SDL2/SDL_filesystem.h +73 -64
- data/assets/include/SDL2/SDL_gamecontroller.h +585 -125
- data/assets/include/SDL2/SDL_gesture.h +36 -6
- data/assets/include/SDL2/SDL_haptic.h +304 -210
- data/assets/include/SDL2/SDL_hidapi.h +451 -0
- data/assets/include/SDL2/SDL_hints.h +1286 -897
- data/assets/include/SDL2/SDL_joystick.h +577 -130
- data/assets/include/SDL2/SDL_keyboard.h +162 -63
- data/assets/include/SDL2/SDL_keycode.h +7 -5
- data/assets/include/SDL2/SDL_loadso.h +42 -8
- data/assets/include/SDL2/SDL_locale.h +34 -32
- data/assets/include/SDL2/SDL_log.h +212 -19
- data/assets/include/SDL2/SDL_main.h +72 -17
- data/assets/include/SDL2/SDL_messagebox.h +70 -23
- data/assets/include/SDL2/SDL_metal.h +27 -32
- data/assets/include/SDL2/SDL_misc.h +19 -15
- data/assets/include/SDL2/SDL_mouse.h +262 -110
- data/assets/include/SDL2/SDL_mutex.h +286 -66
- data/assets/include/SDL2/SDL_name.h +1 -1
- data/assets/include/SDL2/SDL_opengl.h +1 -1
- data/assets/include/SDL2/SDL_opengles.h +1 -1
- data/assets/include/SDL2/SDL_opengles2.h +2 -2
- data/assets/include/SDL2/SDL_pixels.h +199 -34
- data/assets/include/SDL2/SDL_platform.h +39 -2
- data/assets/include/SDL2/SDL_power.h +23 -10
- data/assets/include/SDL2/SDL_quit.h +1 -1
- data/assets/include/SDL2/SDL_rect.h +78 -28
- data/assets/include/SDL2/SDL_render.h +1204 -472
- data/assets/include/SDL2/SDL_revision.h +2 -2
- data/assets/include/SDL2/SDL_rwops.h +605 -33
- data/assets/include/SDL2/SDL_scancode.h +1 -1
- data/assets/include/SDL2/SDL_sensor.h +76 -42
- data/assets/include/SDL2/SDL_shape.h +38 -27
- data/assets/include/SDL2/SDL_stdinc.h +96 -24
- data/assets/include/SDL2/SDL_surface.h +571 -139
- data/assets/include/SDL2/SDL_system.h +339 -101
- data/assets/include/SDL2/SDL_syswm.h +50 -20
- data/assets/include/SDL2/SDL_test.h +1 -1
- data/assets/include/SDL2/SDL_test_assert.h +2 -2
- data/assets/include/SDL2/SDL_test_common.h +23 -6
- data/assets/include/SDL2/SDL_test_compare.h +1 -1
- data/assets/include/SDL2/SDL_test_crc32.h +1 -1
- data/assets/include/SDL2/SDL_test_font.h +3 -3
- data/assets/include/SDL2/SDL_test_fuzzer.h +28 -26
- data/assets/include/SDL2/SDL_test_harness.h +6 -6
- data/assets/include/SDL2/SDL_test_images.h +1 -1
- data/assets/include/SDL2/SDL_test_log.h +1 -1
- data/assets/include/SDL2/SDL_test_md5.h +1 -1
- data/assets/include/SDL2/SDL_test_memory.h +1 -1
- data/assets/include/SDL2/SDL_test_random.h +2 -2
- data/assets/include/SDL2/SDL_thread.h +226 -128
- data/assets/include/SDL2/SDL_timer.h +129 -22
- data/assets/include/SDL2/SDL_touch.h +48 -8
- data/assets/include/SDL2/SDL_ttf.h +102 -9
- data/assets/include/SDL2/SDL_types.h +1 -1
- data/assets/include/SDL2/SDL_version.h +72 -46
- data/assets/include/SDL2/SDL_video.h +1266 -460
- data/assets/include/SDL2/SDL_vulkan.h +100 -161
- data/assets/include/SDL2/begin_code.h +22 -1
- data/assets/include/SDL2/close_code.h +1 -1
- data/assets/include/mrbconf.h +234 -0
- data/assets/include/mruby/array.h +317 -0
- data/assets/include/mruby/boxing_nan.h +130 -0
- data/assets/include/mruby/boxing_no.h +58 -0
- data/assets/include/mruby/boxing_word.h +205 -0
- data/assets/include/mruby/class.h +108 -0
- data/assets/include/mruby/common.h +92 -0
- data/assets/include/mruby/compile.h +210 -0
- data/assets/include/mruby/data.h +76 -0
- data/assets/include/mruby/debug.h +66 -0
- data/assets/include/mruby/dump.h +158 -0
- data/assets/include/mruby/endian.h +44 -0
- data/assets/include/mruby/error.h +137 -0
- data/assets/include/mruby/gc.h +92 -0
- data/assets/include/mruby/hash.h +242 -0
- data/assets/include/mruby/irep.h +147 -0
- data/assets/include/mruby/istruct.h +50 -0
- data/assets/include/mruby/khash.h +284 -0
- data/assets/include/mruby/numeric.h +169 -0
- data/assets/include/mruby/object.h +43 -0
- data/assets/include/mruby/opcode.h +43 -0
- data/assets/include/mruby/ops.h +122 -0
- data/assets/include/mruby/presym/disable.h +70 -0
- data/assets/include/mruby/presym/enable.h +37 -0
- data/assets/include/mruby/presym/scanning.h +73 -0
- data/assets/include/mruby/presym.h +40 -0
- data/assets/include/mruby/proc.h +209 -0
- data/assets/include/mruby/range.h +79 -0
- data/assets/include/mruby/re.h +16 -0
- data/assets/include/mruby/string.h +469 -0
- data/assets/include/mruby/throw.h +66 -0
- data/assets/include/mruby/value.h +400 -0
- data/assets/include/mruby/variable.h +140 -0
- data/assets/include/mruby/version.h +143 -0
- data/assets/include/mruby.h +1444 -0
- data/assets/macos/universal/bin/mrbc +0 -0
- data/assets/macos/universal/lib/libFLAC.a +0 -0
- data/assets/macos/universal/lib/libSDL2.a +0 -0
- data/assets/macos/universal/lib/libSDL2_image.a +0 -0
- data/assets/macos/{lib → universal/lib}/libSDL2_mixer.a +0 -0
- data/assets/macos/universal/lib/libSDL2_ttf.a +0 -0
- data/assets/macos/universal/lib/libfreetype.a +0 -0
- data/assets/macos/universal/lib/libgraphite2.a +0 -0
- data/assets/macos/universal/lib/libharfbuzz.a +0 -0
- data/assets/macos/universal/lib/libjpeg.a +0 -0
- data/assets/macos/{lib → universal/lib}/libmodplug.a +0 -0
- data/assets/macos/{lib → universal/lib}/libmpg123.a +0 -0
- data/assets/{mingw/lib/libSDL2.a → macos/universal/lib/libmruby.a} +0 -0
- data/assets/macos/{lib → universal/lib}/libogg.a +0 -0
- data/assets/macos/universal/lib/libpng16.a +0 -0
- data/assets/macos/universal/lib/libtiff.a +0 -0
- data/assets/macos/universal/lib/libvorbis.a +0 -0
- data/assets/macos/universal/lib/libvorbisfile.a +0 -0
- data/assets/macos/universal/lib/libwebp.a +0 -0
- data/assets/test_media/README.md +3 -0
- data/assets/test_media/bitstream_vera/COPYRIGHT.txt +124 -0
- data/assets/test_media/bitstream_vera/vera.ttf +0 -0
- data/assets/test_media/boom.png +0 -0
- data/assets/test_media/coin.png +0 -0
- data/assets/test_media/colors.png +0 -0
- data/assets/test_media/controller.png +0 -0
- data/assets/test_media/dial.wav +0 -0
- data/assets/test_media/hero.png +0 -0
- data/assets/test_media/image.bmp +0 -0
- data/assets/test_media/image.jpg +0 -0
- data/assets/test_media/image.png +0 -0
- data/assets/test_media/music.flac +0 -0
- data/assets/test_media/music.mp3 +0 -0
- data/assets/test_media/music.ogg +0 -0
- data/assets/test_media/music.wav +0 -0
- data/assets/test_media/originals/boom.pxm +0 -0
- data/assets/test_media/originals/coin.pxm +0 -0
- data/assets/test_media/originals/controller.sketch +0 -0
- data/assets/test_media/originals/hero.pxm +0 -0
- data/assets/test_media/originals/image.pxm +0 -0
- data/assets/test_media/originals/music.caf +0 -0
- data/assets/test_media/originals/texture_atlas.pxm +0 -0
- data/assets/test_media/rondo_alla_turka.ogg +0 -0
- data/assets/test_media/sound.flac +0 -0
- data/assets/test_media/sound.mp3 +0 -0
- data/assets/test_media/sound.ogg +0 -0
- data/assets/test_media/sound.wav +0 -0
- data/assets/test_media/sprite_sheet.png +0 -0
- data/assets/test_media/texture_atlas.png +0 -0
- data/assets/wasm/build_config.rb +13 -0
- data/assets/wasm/libmruby.a +0 -0
- data/assets/wasm/template.html +17 -0
- data/assets/windows/glew/README.md +10 -0
- data/assets/windows/glew/glew.h +23686 -0
- data/assets/{mingw/lib → windows/glew}/libglew32.a +0 -0
- data/assets/windows/mingw-w64-x86_64/bin/mrbc.exe +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libFLAC.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libLerc.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libSDL2.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libSDL2_image.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libSDL2_mixer.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libSDL2_ttf.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libbrotlicommon.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libbrotlidec.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libbz2.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libdeflate.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libfreetype.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libglew32.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libgraphite2.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libharfbuzz.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libjbig.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libjpeg.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/liblzma.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libmodplug.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libmpg123.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libmruby.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libogg.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libopus.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libopusfile.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libpng16.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libsndfile.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libssp.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libstdc++.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libtiff.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libvorbis.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libvorbisfile.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libwebp.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libz.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libzstd.a +0 -0
- data/assets/{ios → xcode/ios}/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
- data/assets/{ios → xcode/ios}/Assets.xcassets/Contents.json +0 -0
- data/assets/{ios → xcode/ios}/Base.lproj/LaunchScreen.storyboard +0 -0
- data/assets/{ios → xcode/ios}/Info.plist +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mrbconf.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/array.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/class.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/common.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/compile.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/data.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/debug.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/dump.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/error.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/gc.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/hash.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/irep.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/istruct.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/khash.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/numeric.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/object.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/opcode.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/ops.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/proc.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/range.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/re.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/string.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/throw.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/value.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/variable.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/version.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Info.plist +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/MRuby +0 -0
- data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.pbxproj +0 -0
- data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
- data/assets/{ios → xcode/ios}/main.c +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/LaunchImage.launchimage/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Info.plist +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mrbconf.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/array.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/class.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/common.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/compile.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/data.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/debug.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/dump.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/error.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/gc.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/hash.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/irep.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/istruct.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/khash.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/numeric.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/object.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/opcode.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/ops.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/proc.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/range.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/re.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/string.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/throw.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/value.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/variable.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/version.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Info.plist +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/MRuby +0 -0
- data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.pbxproj +0 -0
- data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
- data/assets/{tvos → xcode/tvos}/main.c +0 -0
- data/bin/ruby2d +3 -4
- data/ext/ruby2d/extconf.rb +39 -25
- data/ext/ruby2d/gl.c +1 -1
- data/ext/ruby2d/gl3.c +0 -1
- data/ext/ruby2d/gles.c +137 -84
- data/ext/ruby2d/ruby2d.c +126 -32
- data/ext/ruby2d/ruby2d.h +53 -6
- data/ext/ruby2d/text.c +14 -1
- data/ext/ruby2d/window.c +253 -215
- data/lib/ruby2d/cli/build.rb +237 -59
- data/lib/ruby2d/cli/colorize.rb +5 -4
- data/lib/ruby2d/cli/platform.rb +17 -0
- data/lib/ruby2d/font.rb +7 -1
- data/lib/ruby2d/sprite.rb +7 -2
- data/lib/ruby2d/text.rb +1 -3
- data/lib/ruby2d/texture.rb +21 -21
- data/lib/ruby2d/tileset.rb +34 -33
- data/lib/ruby2d/version.rb +1 -1
- data/lib/ruby2d/vertices.rb +11 -6
- data/lib/ruby2d.rb +14 -20
- metadata +246 -152
- data/assets/README.md +0 -22
- data/assets/Rakefile +0 -85
- data/assets/macos/lib/libFLAC.a +0 -0
- data/assets/macos/lib/libSDL2.a +0 -0
- data/assets/macos/lib/libSDL2_image.a +0 -0
- data/assets/macos/lib/libSDL2_ttf.a +0 -0
- data/assets/macos/lib/libfreetype.a +0 -0
- data/assets/macos/lib/libjpeg.a +0 -0
- data/assets/macos/lib/libpng16.a +0 -0
- data/assets/macos/lib/libtiff.a +0 -0
- data/assets/macos/lib/libvorbis.a +0 -0
- data/assets/macos/lib/libvorbisfile.a +0 -0
- data/assets/macos/lib/libwebp.a +0 -0
- data/assets/mingw/bin/SDL2.dll +0 -0
- data/assets/mingw/bin/SDL2_image.dll +0 -0
- data/assets/mingw/bin/SDL2_mixer.dll +0 -0
- data/assets/mingw/bin/SDL2_ttf.dll +0 -0
- data/assets/mingw/bin/glew32.dll +0 -0
- data/assets/mingw/bin/libFLAC-8.dll +0 -0
- data/assets/mingw/bin/libfreetype-6.dll +0 -0
- data/assets/mingw/bin/libjpeg-9.dll +0 -0
- data/assets/mingw/bin/libmodplug-1.dll +0 -0
- data/assets/mingw/bin/libmpg123-0.dll +0 -0
- data/assets/mingw/bin/libogg-0.dll +0 -0
- data/assets/mingw/bin/libopus-0.dll +0 -0
- data/assets/mingw/bin/libopusfile-0.dll +0 -0
- data/assets/mingw/bin/libpng16-16.dll +0 -0
- data/assets/mingw/bin/libtiff-5.dll +0 -0
- data/assets/mingw/bin/libvorbis-0.dll +0 -0
- data/assets/mingw/bin/libvorbisfile-3.dll +0 -0
- data/assets/mingw/bin/libwebp-7.dll +0 -0
- data/assets/mingw/bin/zlib1.dll +0 -0
- data/assets/mingw/lib/libSDL2.dll.a +0 -0
- data/assets/mingw/lib/libSDL2_image.a +0 -0
- data/assets/mingw/lib/libSDL2_image.dll.a +0 -0
- data/assets/mingw/lib/libSDL2_mixer.a +0 -0
- data/assets/mingw/lib/libSDL2_mixer.dll.a +0 -0
- data/assets/mingw/lib/libSDL2_test.a +0 -0
- data/assets/mingw/lib/libSDL2_ttf.a +0 -0
- data/assets/mingw/lib/libSDL2_ttf.dll.a +0 -0
- data/assets/mingw/lib/libSDL2main.a +0 -0
- data/assets/mingw/lib/libglew32.dll.a +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
Simple DirectMedia Layer
|
|
3
|
-
Copyright (C) 1997-
|
|
3
|
+
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
|
4
4
|
|
|
5
5
|
This software is provided 'as-is', without any express or implied
|
|
6
6
|
warranty. In no event will the authors be held liable for any damages
|
|
@@ -34,11 +34,20 @@
|
|
|
34
34
|
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
|
35
35
|
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
|
36
36
|
#ifdef __clang__
|
|
37
|
-
/*
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
#
|
|
41
|
-
#
|
|
37
|
+
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
|
38
|
+
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
|
39
|
+
|
|
40
|
+
#ifndef __PRFCHWINTRIN_H
|
|
41
|
+
#define __PRFCHWINTRIN_H
|
|
42
|
+
|
|
43
|
+
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
|
44
|
+
_m_prefetch(void *__P)
|
|
45
|
+
{
|
|
46
|
+
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
#endif /* __PRFCHWINTRIN_H */
|
|
50
|
+
#endif /* __clang__ */
|
|
42
51
|
#include <intrin.h>
|
|
43
52
|
#ifndef _WIN64
|
|
44
53
|
#ifndef __MMX__
|
|
@@ -54,9 +63,14 @@
|
|
|
54
63
|
#ifndef __SSE2__
|
|
55
64
|
#define __SSE2__
|
|
56
65
|
#endif
|
|
57
|
-
#
|
|
66
|
+
#ifndef __SSE3__
|
|
67
|
+
#define __SSE3__
|
|
68
|
+
#endif
|
|
58
69
|
#elif defined(__MINGW64_VERSION_MAJOR)
|
|
59
70
|
#include <intrin.h>
|
|
71
|
+
#if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON)
|
|
72
|
+
# include <arm_neon.h>
|
|
73
|
+
#endif
|
|
60
74
|
#else
|
|
61
75
|
/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
|
|
62
76
|
#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
|
|
@@ -79,6 +93,8 @@
|
|
|
79
93
|
# endif
|
|
80
94
|
# endif
|
|
81
95
|
#endif
|
|
96
|
+
#endif /* compiler version */
|
|
97
|
+
|
|
82
98
|
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
|
|
83
99
|
#include <mm3dnow.h>
|
|
84
100
|
#endif
|
|
@@ -98,7 +114,6 @@
|
|
|
98
114
|
#include <pmmintrin.h>
|
|
99
115
|
#endif
|
|
100
116
|
#endif /* HAVE_IMMINTRIN_H */
|
|
101
|
-
#endif /* compiler version */
|
|
102
117
|
|
|
103
118
|
#include "begin_code.h"
|
|
104
119
|
/* Set up for C function definitions, even when using C++ */
|
|
@@ -114,136 +129,370 @@ extern "C" {
|
|
|
114
129
|
#define SDL_CACHELINE_SIZE 128
|
|
115
130
|
|
|
116
131
|
/**
|
|
117
|
-
*
|
|
132
|
+
* Get the number of CPU cores available.
|
|
133
|
+
*
|
|
134
|
+
* \returns the total number of logical CPU cores. On CPUs that include
|
|
135
|
+
* technologies such as hyperthreading, the number of logical cores
|
|
136
|
+
* may be more than the number of physical cores.
|
|
137
|
+
*
|
|
138
|
+
* \since This function is available since SDL 2.0.0.
|
|
118
139
|
*/
|
|
119
140
|
extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
|
|
120
141
|
|
|
121
142
|
/**
|
|
122
|
-
*
|
|
143
|
+
* Determine the L1 cache line size of the CPU.
|
|
144
|
+
*
|
|
145
|
+
* This is useful for determining multi-threaded structure padding or SIMD
|
|
146
|
+
* prefetch sizes.
|
|
147
|
+
*
|
|
148
|
+
* \returns the L1 cache line size of the CPU, in bytes.
|
|
123
149
|
*
|
|
124
|
-
*
|
|
125
|
-
* or SIMD prefetch sizes.
|
|
150
|
+
* \since This function is available since SDL 2.0.0.
|
|
126
151
|
*/
|
|
127
152
|
extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
|
|
128
153
|
|
|
129
154
|
/**
|
|
130
|
-
*
|
|
155
|
+
* Determine whether the CPU has the RDTSC instruction.
|
|
156
|
+
*
|
|
157
|
+
* This always returns false on CPUs that aren't using Intel instruction sets.
|
|
158
|
+
*
|
|
159
|
+
* \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not.
|
|
160
|
+
*
|
|
161
|
+
* \since This function is available since SDL 2.0.0.
|
|
162
|
+
*
|
|
163
|
+
* \sa SDL_Has3DNow
|
|
164
|
+
* \sa SDL_HasAltiVec
|
|
165
|
+
* \sa SDL_HasAVX
|
|
166
|
+
* \sa SDL_HasAVX2
|
|
167
|
+
* \sa SDL_HasMMX
|
|
168
|
+
* \sa SDL_HasSSE
|
|
169
|
+
* \sa SDL_HasSSE2
|
|
170
|
+
* \sa SDL_HasSSE3
|
|
171
|
+
* \sa SDL_HasSSE41
|
|
172
|
+
* \sa SDL_HasSSE42
|
|
131
173
|
*/
|
|
132
174
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
|
|
133
175
|
|
|
134
176
|
/**
|
|
135
|
-
*
|
|
177
|
+
* Determine whether the CPU has AltiVec features.
|
|
178
|
+
*
|
|
179
|
+
* This always returns false on CPUs that aren't using PowerPC instruction
|
|
180
|
+
* sets.
|
|
181
|
+
*
|
|
182
|
+
* \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
|
|
183
|
+
*
|
|
184
|
+
* \since This function is available since SDL 2.0.0.
|
|
185
|
+
*
|
|
186
|
+
* \sa SDL_Has3DNow
|
|
187
|
+
* \sa SDL_HasAVX
|
|
188
|
+
* \sa SDL_HasAVX2
|
|
189
|
+
* \sa SDL_HasMMX
|
|
190
|
+
* \sa SDL_HasRDTSC
|
|
191
|
+
* \sa SDL_HasSSE
|
|
192
|
+
* \sa SDL_HasSSE2
|
|
193
|
+
* \sa SDL_HasSSE3
|
|
194
|
+
* \sa SDL_HasSSE41
|
|
195
|
+
* \sa SDL_HasSSE42
|
|
136
196
|
*/
|
|
137
197
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
|
|
138
198
|
|
|
139
199
|
/**
|
|
140
|
-
*
|
|
200
|
+
* Determine whether the CPU has MMX features.
|
|
201
|
+
*
|
|
202
|
+
* This always returns false on CPUs that aren't using Intel instruction sets.
|
|
203
|
+
*
|
|
204
|
+
* \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
|
|
205
|
+
*
|
|
206
|
+
* \since This function is available since SDL 2.0.0.
|
|
207
|
+
*
|
|
208
|
+
* \sa SDL_Has3DNow
|
|
209
|
+
* \sa SDL_HasAltiVec
|
|
210
|
+
* \sa SDL_HasAVX
|
|
211
|
+
* \sa SDL_HasAVX2
|
|
212
|
+
* \sa SDL_HasRDTSC
|
|
213
|
+
* \sa SDL_HasSSE
|
|
214
|
+
* \sa SDL_HasSSE2
|
|
215
|
+
* \sa SDL_HasSSE3
|
|
216
|
+
* \sa SDL_HasSSE41
|
|
217
|
+
* \sa SDL_HasSSE42
|
|
141
218
|
*/
|
|
142
219
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
|
|
143
220
|
|
|
144
221
|
/**
|
|
145
|
-
*
|
|
222
|
+
* Determine whether the CPU has 3DNow! features.
|
|
223
|
+
*
|
|
224
|
+
* This always returns false on CPUs that aren't using AMD instruction sets.
|
|
225
|
+
*
|
|
226
|
+
* \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not.
|
|
227
|
+
*
|
|
228
|
+
* \since This function is available since SDL 2.0.0.
|
|
229
|
+
*
|
|
230
|
+
* \sa SDL_HasAltiVec
|
|
231
|
+
* \sa SDL_HasAVX
|
|
232
|
+
* \sa SDL_HasAVX2
|
|
233
|
+
* \sa SDL_HasMMX
|
|
234
|
+
* \sa SDL_HasRDTSC
|
|
235
|
+
* \sa SDL_HasSSE
|
|
236
|
+
* \sa SDL_HasSSE2
|
|
237
|
+
* \sa SDL_HasSSE3
|
|
238
|
+
* \sa SDL_HasSSE41
|
|
239
|
+
* \sa SDL_HasSSE42
|
|
146
240
|
*/
|
|
147
241
|
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
|
|
148
242
|
|
|
149
243
|
/**
|
|
150
|
-
*
|
|
244
|
+
* Determine whether the CPU has SSE features.
|
|
245
|
+
*
|
|
246
|
+
* This always returns false on CPUs that aren't using Intel instruction sets.
|
|
247
|
+
*
|
|
248
|
+
* \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
|
|
249
|
+
*
|
|
250
|
+
* \since This function is available since SDL 2.0.0.
|
|
251
|
+
*
|
|
252
|
+
* \sa SDL_Has3DNow
|
|
253
|
+
* \sa SDL_HasAltiVec
|
|
254
|
+
* \sa SDL_HasAVX
|
|
255
|
+
* \sa SDL_HasAVX2
|
|
256
|
+
* \sa SDL_HasMMX
|
|
257
|
+
* \sa SDL_HasRDTSC
|
|
258
|
+
* \sa SDL_HasSSE2
|
|
259
|
+
* \sa SDL_HasSSE3
|
|
260
|
+
* \sa SDL_HasSSE41
|
|
261
|
+
* \sa SDL_HasSSE42
|
|
151
262
|
*/
|
|
152
263
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
|
|
153
264
|
|
|
154
265
|
/**
|
|
155
|
-
*
|
|
266
|
+
* Determine whether the CPU has SSE2 features.
|
|
267
|
+
*
|
|
268
|
+
* This always returns false on CPUs that aren't using Intel instruction sets.
|
|
269
|
+
*
|
|
270
|
+
* \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
|
|
271
|
+
*
|
|
272
|
+
* \since This function is available since SDL 2.0.0.
|
|
273
|
+
*
|
|
274
|
+
* \sa SDL_Has3DNow
|
|
275
|
+
* \sa SDL_HasAltiVec
|
|
276
|
+
* \sa SDL_HasAVX
|
|
277
|
+
* \sa SDL_HasAVX2
|
|
278
|
+
* \sa SDL_HasMMX
|
|
279
|
+
* \sa SDL_HasRDTSC
|
|
280
|
+
* \sa SDL_HasSSE
|
|
281
|
+
* \sa SDL_HasSSE3
|
|
282
|
+
* \sa SDL_HasSSE41
|
|
283
|
+
* \sa SDL_HasSSE42
|
|
156
284
|
*/
|
|
157
285
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
|
|
158
286
|
|
|
159
287
|
/**
|
|
160
|
-
*
|
|
288
|
+
* Determine whether the CPU has SSE3 features.
|
|
289
|
+
*
|
|
290
|
+
* This always returns false on CPUs that aren't using Intel instruction sets.
|
|
291
|
+
*
|
|
292
|
+
* \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
|
|
293
|
+
*
|
|
294
|
+
* \since This function is available since SDL 2.0.0.
|
|
295
|
+
*
|
|
296
|
+
* \sa SDL_Has3DNow
|
|
297
|
+
* \sa SDL_HasAltiVec
|
|
298
|
+
* \sa SDL_HasAVX
|
|
299
|
+
* \sa SDL_HasAVX2
|
|
300
|
+
* \sa SDL_HasMMX
|
|
301
|
+
* \sa SDL_HasRDTSC
|
|
302
|
+
* \sa SDL_HasSSE
|
|
303
|
+
* \sa SDL_HasSSE2
|
|
304
|
+
* \sa SDL_HasSSE41
|
|
305
|
+
* \sa SDL_HasSSE42
|
|
161
306
|
*/
|
|
162
307
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
|
|
163
308
|
|
|
164
309
|
/**
|
|
165
|
-
*
|
|
310
|
+
* Determine whether the CPU has SSE4.1 features.
|
|
311
|
+
*
|
|
312
|
+
* This always returns false on CPUs that aren't using Intel instruction sets.
|
|
313
|
+
*
|
|
314
|
+
* \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
|
|
315
|
+
*
|
|
316
|
+
* \since This function is available since SDL 2.0.0.
|
|
317
|
+
*
|
|
318
|
+
* \sa SDL_Has3DNow
|
|
319
|
+
* \sa SDL_HasAltiVec
|
|
320
|
+
* \sa SDL_HasAVX
|
|
321
|
+
* \sa SDL_HasAVX2
|
|
322
|
+
* \sa SDL_HasMMX
|
|
323
|
+
* \sa SDL_HasRDTSC
|
|
324
|
+
* \sa SDL_HasSSE
|
|
325
|
+
* \sa SDL_HasSSE2
|
|
326
|
+
* \sa SDL_HasSSE3
|
|
327
|
+
* \sa SDL_HasSSE42
|
|
166
328
|
*/
|
|
167
329
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
|
|
168
330
|
|
|
169
331
|
/**
|
|
170
|
-
*
|
|
332
|
+
* Determine whether the CPU has SSE4.2 features.
|
|
333
|
+
*
|
|
334
|
+
* This always returns false on CPUs that aren't using Intel instruction sets.
|
|
335
|
+
*
|
|
336
|
+
* \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
|
|
337
|
+
*
|
|
338
|
+
* \since This function is available since SDL 2.0.0.
|
|
339
|
+
*
|
|
340
|
+
* \sa SDL_Has3DNow
|
|
341
|
+
* \sa SDL_HasAltiVec
|
|
342
|
+
* \sa SDL_HasAVX
|
|
343
|
+
* \sa SDL_HasAVX2
|
|
344
|
+
* \sa SDL_HasMMX
|
|
345
|
+
* \sa SDL_HasRDTSC
|
|
346
|
+
* \sa SDL_HasSSE
|
|
347
|
+
* \sa SDL_HasSSE2
|
|
348
|
+
* \sa SDL_HasSSE3
|
|
349
|
+
* \sa SDL_HasSSE41
|
|
171
350
|
*/
|
|
172
351
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
|
|
173
352
|
|
|
174
353
|
/**
|
|
175
|
-
*
|
|
354
|
+
* Determine whether the CPU has AVX features.
|
|
355
|
+
*
|
|
356
|
+
* This always returns false on CPUs that aren't using Intel instruction sets.
|
|
357
|
+
*
|
|
358
|
+
* \returns SDL_TRUE if the CPU has AVX features or SDL_FALSE if not.
|
|
359
|
+
*
|
|
360
|
+
* \since This function is available since SDL 2.0.2.
|
|
361
|
+
*
|
|
362
|
+
* \sa SDL_Has3DNow
|
|
363
|
+
* \sa SDL_HasAltiVec
|
|
364
|
+
* \sa SDL_HasAVX2
|
|
365
|
+
* \sa SDL_HasMMX
|
|
366
|
+
* \sa SDL_HasRDTSC
|
|
367
|
+
* \sa SDL_HasSSE
|
|
368
|
+
* \sa SDL_HasSSE2
|
|
369
|
+
* \sa SDL_HasSSE3
|
|
370
|
+
* \sa SDL_HasSSE41
|
|
371
|
+
* \sa SDL_HasSSE42
|
|
176
372
|
*/
|
|
177
373
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
|
178
374
|
|
|
179
375
|
/**
|
|
180
|
-
*
|
|
376
|
+
* Determine whether the CPU has AVX2 features.
|
|
377
|
+
*
|
|
378
|
+
* This always returns false on CPUs that aren't using Intel instruction sets.
|
|
379
|
+
*
|
|
380
|
+
* \returns SDL_TRUE if the CPU has AVX2 features or SDL_FALSE if not.
|
|
381
|
+
*
|
|
382
|
+
* \since This function is available since SDL 2.0.4.
|
|
383
|
+
*
|
|
384
|
+
* \sa SDL_Has3DNow
|
|
385
|
+
* \sa SDL_HasAltiVec
|
|
386
|
+
* \sa SDL_HasAVX
|
|
387
|
+
* \sa SDL_HasMMX
|
|
388
|
+
* \sa SDL_HasRDTSC
|
|
389
|
+
* \sa SDL_HasSSE
|
|
390
|
+
* \sa SDL_HasSSE2
|
|
391
|
+
* \sa SDL_HasSSE3
|
|
392
|
+
* \sa SDL_HasSSE41
|
|
393
|
+
* \sa SDL_HasSSE42
|
|
181
394
|
*/
|
|
182
395
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
|
183
396
|
|
|
184
397
|
/**
|
|
185
|
-
*
|
|
398
|
+
* Determine whether the CPU has AVX-512F (foundation) features.
|
|
399
|
+
*
|
|
400
|
+
* This always returns false on CPUs that aren't using Intel instruction sets.
|
|
401
|
+
*
|
|
402
|
+
* \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
|
|
403
|
+
*
|
|
404
|
+
* \since This function is available since SDL 2.0.9.
|
|
405
|
+
*
|
|
406
|
+
* \sa SDL_HasAVX
|
|
186
407
|
*/
|
|
187
408
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
|
|
188
409
|
|
|
189
410
|
/**
|
|
190
|
-
*
|
|
411
|
+
* Determine whether the CPU has ARM SIMD (ARMv6) features.
|
|
412
|
+
*
|
|
413
|
+
* This is different from ARM NEON, which is a different instruction set.
|
|
414
|
+
*
|
|
415
|
+
* This always returns false on CPUs that aren't using ARM instruction sets.
|
|
416
|
+
*
|
|
417
|
+
* \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
|
|
418
|
+
*
|
|
419
|
+
* \since This function is available since SDL 2.0.12.
|
|
420
|
+
*
|
|
421
|
+
* \sa SDL_HasNEON
|
|
191
422
|
*/
|
|
192
423
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
|
|
193
424
|
|
|
194
425
|
/**
|
|
195
|
-
*
|
|
426
|
+
* Determine whether the CPU has NEON (ARM SIMD) features.
|
|
427
|
+
*
|
|
428
|
+
* This always returns false on CPUs that aren't using ARM instruction sets.
|
|
429
|
+
*
|
|
430
|
+
* \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
|
|
431
|
+
*
|
|
432
|
+
* \since This function is available since SDL 2.0.6.
|
|
196
433
|
*/
|
|
197
434
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
|
198
435
|
|
|
199
436
|
/**
|
|
200
|
-
*
|
|
437
|
+
* Get the amount of RAM configured in the system.
|
|
438
|
+
*
|
|
439
|
+
* \returns the amount of RAM configured in the system in MB.
|
|
440
|
+
*
|
|
441
|
+
* \since This function is available since SDL 2.0.1.
|
|
201
442
|
*/
|
|
202
443
|
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
|
203
444
|
|
|
204
445
|
/**
|
|
205
|
-
*
|
|
446
|
+
* Report the alignment this system needs for SIMD allocations.
|
|
206
447
|
*
|
|
207
448
|
* This will return the minimum number of bytes to which a pointer must be
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
449
|
+
* aligned to be compatible with SIMD instructions on the current machine. For
|
|
450
|
+
* example, if the machine supports SSE only, it will return 16, but if it
|
|
451
|
+
* supports AVX-512F, it'll return 64 (etc). This only reports values for
|
|
452
|
+
* instruction sets SDL knows about, so if your SDL build doesn't have
|
|
453
|
+
* SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
|
|
454
|
+
* not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
|
|
455
|
+
* Plan accordingly.
|
|
456
|
+
*
|
|
457
|
+
* \returns the alignment in bytes needed for available, known SIMD
|
|
458
|
+
* instructions.
|
|
459
|
+
*
|
|
460
|
+
* \since This function is available since SDL 2.0.10.
|
|
215
461
|
*/
|
|
216
462
|
extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
|
|
217
463
|
|
|
218
464
|
/**
|
|
219
|
-
*
|
|
465
|
+
* Allocate memory in a SIMD-friendly way.
|
|
220
466
|
*
|
|
221
467
|
* This will allocate a block of memory that is suitable for use with SIMD
|
|
222
|
-
*
|
|
223
|
-
*
|
|
468
|
+
* instructions. Specifically, it will be properly aligned and padded for the
|
|
469
|
+
* system's supported vector instructions.
|
|
224
470
|
*
|
|
225
|
-
* The memory returned will be padded such that it is safe to read or write
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
471
|
+
* The memory returned will be padded such that it is safe to read or write an
|
|
472
|
+
* incomplete vector at the end of the memory block. This can be useful so you
|
|
473
|
+
* don't have to drop back to a scalar fallback at the end of your SIMD
|
|
474
|
+
* processing loop to deal with the final elements without overflowing the
|
|
475
|
+
* allocated buffer.
|
|
230
476
|
*
|
|
231
|
-
* You must free this memory with SDL_FreeSIMD(), not free() or SDL_free()
|
|
232
|
-
*
|
|
477
|
+
* You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() or
|
|
478
|
+
* delete[], etc.
|
|
233
479
|
*
|
|
234
|
-
* Note that SDL will only deal with SIMD instruction sets it is aware of;
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
480
|
+
* Note that SDL will only deal with SIMD instruction sets it is aware of; for
|
|
481
|
+
* example, SDL 2.0.8 knows that SSE wants 16-byte vectors (SDL_HasSSE()), and
|
|
482
|
+
* AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't know that AVX-512 wants
|
|
483
|
+
* 64. To be clear: if you can't decide to use an instruction set with an
|
|
484
|
+
* SDL_Has*() function, don't use that instruction set with memory allocated
|
|
485
|
+
* through here.
|
|
240
486
|
*
|
|
241
487
|
* SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
|
|
242
|
-
*
|
|
488
|
+
* out of memory, but you are not allowed to dereference it (because you only
|
|
489
|
+
* own zero bytes of that buffer).
|
|
243
490
|
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
* \
|
|
491
|
+
* \param len The length, in bytes, of the block to allocate. The actual
|
|
492
|
+
* allocated block might be larger due to padding, etc.
|
|
493
|
+
* \returns a pointer to the newly-allocated block, NULL if out of memory.
|
|
494
|
+
*
|
|
495
|
+
* \since This function is available since SDL 2.0.10.
|
|
247
496
|
*
|
|
248
497
|
* \sa SDL_SIMDAlignment
|
|
249
498
|
* \sa SDL_SIMDRealloc
|
|
@@ -252,20 +501,22 @@ extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
|
|
|
252
501
|
extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
|
|
253
502
|
|
|
254
503
|
/**
|
|
255
|
-
*
|
|
504
|
+
* Reallocate memory obtained from SDL_SIMDAlloc
|
|
256
505
|
*
|
|
257
506
|
* It is not valid to use this function on a pointer from anything but
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
* \
|
|
507
|
+
* SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
|
|
508
|
+
* SDL_malloc, memalign, new[], etc.
|
|
509
|
+
*
|
|
510
|
+
* \param mem The pointer obtained from SDL_SIMDAlloc. This function also
|
|
511
|
+
* accepts NULL, at which point this function is the same as
|
|
512
|
+
* calling SDL_SIMDAlloc with a NULL pointer.
|
|
513
|
+
* \param len The length, in bytes, of the block to allocated. The actual
|
|
514
|
+
* allocated block might be larger due to padding, etc. Passing 0
|
|
515
|
+
* will return a non-NULL pointer, assuming the system isn't out of
|
|
516
|
+
* memory.
|
|
517
|
+
* \returns a pointer to the newly-reallocated block, NULL if out of memory.
|
|
518
|
+
*
|
|
519
|
+
* \since This function is available since SDL 2.0.14.
|
|
269
520
|
*
|
|
270
521
|
* \sa SDL_SIMDAlignment
|
|
271
522
|
* \sa SDL_SIMDAlloc
|
|
@@ -274,20 +525,29 @@ extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
|
|
|
274
525
|
extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
|
|
275
526
|
|
|
276
527
|
/**
|
|
277
|
-
*
|
|
528
|
+
* Deallocate memory obtained from SDL_SIMDAlloc
|
|
278
529
|
*
|
|
279
530
|
* It is not valid to use this function on a pointer from anything but
|
|
280
|
-
*
|
|
281
|
-
*
|
|
531
|
+
* SDL_SIMDAlloc() or SDL_SIMDRealloc(). It can't be used on pointers from
|
|
532
|
+
* malloc, realloc, SDL_malloc, memalign, new[], etc.
|
|
282
533
|
*
|
|
283
534
|
* However, SDL_SIMDFree(NULL) is a legal no-op.
|
|
284
535
|
*
|
|
536
|
+
* The memory pointed to by `ptr` is no longer valid for access upon return,
|
|
537
|
+
* and may be returned to the system or reused by a future allocation. The
|
|
538
|
+
* pointer passed to this function is no longer safe to dereference once this
|
|
539
|
+
* function returns, and should be discarded.
|
|
540
|
+
*
|
|
541
|
+
* \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to
|
|
542
|
+
* deallocate. NULL is a legal no-op.
|
|
543
|
+
*
|
|
544
|
+
* \since This function is available since SDL 2.0.10.
|
|
545
|
+
*
|
|
285
546
|
* \sa SDL_SIMDAlloc
|
|
286
547
|
* \sa SDL_SIMDRealloc
|
|
287
548
|
*/
|
|
288
549
|
extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
|
|
289
550
|
|
|
290
|
-
/* vi: set ts=4 sw=4 expandtab: */
|
|
291
551
|
/* Ends C function definitions when using C++ */
|
|
292
552
|
#ifdef __cplusplus
|
|
293
553
|
}
|